Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
fb970762
Commit
fb970762
authored
1 year ago
by
Chris Sangwin
Browse files
Options
Downloads
Patches
Plain Diff
WIP: fix behat tests to reflect changed in master (Moodle 4.4) on restore courses.
parent
7771bf2a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/behat/restore_demo.feature
+17
-4
17 additions, 4 deletions
tests/behat/restore_demo.feature
tests/behat/restore_reveal_question.feature
+33
-6
33 additions, 6 deletions
tests/behat/restore_reveal_question.feature
with
50 additions
and
10 deletions
tests/behat/restore_demo.feature
+
17
−
4
View file @
fb970762
...
...
@@ -10,13 +10,26 @@ Feature: Test restoring a backup including STACK questions
|
Demonstrating
STACK
|
STACK
|
And
I log in as
"admin"
And
I navigate to
"Courses > Restore course"
in site administration
And I click on "Manage backup files" "button" in the "//h2[contains(., 'User private backup area')]/following-sibling
::
div[1]"
"xpath_element"
@javascript
@_file_upload
Scenario
:
Restore the STACK demo course in Moodle ≤ 4.3.
Given
the site is running Moodle version 4.3 or lower
When I click on "Manage backup files" "button" in the "//h2[contains(., 'User private backup area')]/following-sibling
::
div[1]"
"xpath_element"
And
I upload
"question/type/stack/samplequestions/STACK-syntax-quiz.mbz"
file to
"Files"
filemanager
And
I press
"Save changes"
And I restore "STACK-syntax-quiz" backup into "Demonstrating STACK" course using this options
:
And
I am on
"Demonstrating STACK"
course homepage
Then
I should see
"Stack Syntax Quiz"
And
I am on the
"Stack Syntax Quiz"
"mod_quiz > edit"
page
And
I should see
"Syntax-21-Numbers-Greek"
@javascript
@_file_upload
Scenario
:
Restore the STACK demo course.
When I restore "STACK-syntax-quiz" backup into "Demonstrating STACK" course using this options
:
Scenario
:
Restore the STACK demo course in Moodle ≥ 4.4.
Given
the site is running Moodle version 4.4 or higher
When
I press
"Manage course backups"
And
I upload
"question/type/stack/samplequestions/STACK-syntax-quiz.mbz"
file to
"Files"
filemanager
And
I press
"Save changes"
And I restore "STACK-syntax-quiz" backup into "Demonstrating STACK" course using this options
:
And
I am on
"Demonstrating STACK"
course homepage
Then
I should see
"Stack Syntax Quiz"
And
I am on the
"Stack Syntax Quiz"
"mod_quiz > edit"
page
...
...
This diff is collapsed.
Click to expand it.
tests/behat/restore_reveal_question.feature
+
33
−
6
View file @
fb970762
...
...
@@ -10,14 +10,14 @@ Feature: Test restoring and testing an individual STACK question from the sample
|
Demonstrating
STACK
|
STACK
|
And
I log in as
"admin"
And
I navigate to
"Courses > Restore course"
in site administration
And I click on "Manage backup files" "button" in the "//h2[contains(., 'User private backup area')]/following-sibling
::
div[1]"
"xpath_element"
And
I upload
"question/type/stack/samplequestions/STACK-reveal-test.mbz"
file to
"Files"
filemanager
And
I press
"Save changes"
@javascript
@_file_upload
Scenario
:
Restore the STACK demo course on a Moodle ≤ 3.11
Given
the site is running Moodle version 3.11 or lower
When I restore "STACK-reveal-test" backup into "Demonstrating STACK" course using this options
:
When I click on "Manage backup files" "button" in the "//h2[contains(., 'User private backup area')]/following-sibling
::
div[1]"
"xpath_element"
And
I upload
"question/type/stack/samplequestions/STACK-reveal-test.mbz"
file to
"Files"
filemanager
And
I press
"Save changes"
And I restore "STACK-reveal-test" backup into "Demonstrating STACK" course using this options
:
And
I am on
"Demonstrating STACK"
course homepage
Then
I should see
"Reveal block test"
When
I follow
"Reveal block test"
...
...
@@ -38,9 +38,36 @@ Feature: Test restoring and testing an individual STACK question from the sample
Then
I should see
"Correct answer, well done."
@javascript
@_file_upload
Scenario
:
Restore the STACK demo course on a Moodle ≥ 4.0
Scenario
:
Restore the STACK demo course on a Moodle
4.3
≥ 4.0
Given
the site is running Moodle version 4.0 or higher
When I restore "STACK-reveal-test" backup into "Demonstrating STACK" course using this options
:
Given
the site is running Moodle version 4.3 or lower
When I click on "Manage backup files" "button" in the "//h2[contains(., 'User private backup area')]/following-sibling
::
div[1]"
"xpath_element"
And
I upload
"question/type/stack/samplequestions/STACK-reveal-test.mbz"
file to
"Files"
filemanager
And
I press
"Save changes"
And I restore "STACK-reveal-test" backup into "Demonstrating STACK" course using this options
:
And
I am on
"Demonstrating STACK"
course homepage
Then
I should see
"Reveal block test"
When
I follow
"Reveal block test"
And
I click on
"Preview quiz"
"button"
Then
I should see
"made from the straight line through the origin"
When
I set the input
"ans1"
to
"true"
in the STACK question
And
I wait
"2"
seconds
Then
I should see
"If true write the subspace in parametric form"
When
I set the input
"ans2_sub_0_0"
to
"-t"
in the STACK question
When
I set the input
"ans2_sub_1_0"
to
"3*t"
in the STACK question
When
I set the input
"ans2_sub_2_0"
to
"2*t"
in the STACK question
When
I set the input
"ans3"
to
"[t]"
in the STACK question
And
I wait
"2"
seconds
When
I press
"Check"
Then
I should see
"Correct answer, well done."
@javascript
@_file_upload
Scenario
:
Restore the STACK demo course on a Moodle ≥ 4.4
Given
the site is running Moodle version 4.4 or higher
When
I press
"Manage course backups"
And
I upload
"question/type/stack/samplequestions/STACK-reveal-test.mbz"
file to
"Files"
filemanager
And
I press
"Save changes"
And I restore "STACK-reveal-test" backup into "Demonstrating STACK" course using this options
:
And
I am on
"Demonstrating STACK"
course homepage
Then
I should see
"Reveal block test"
When
I follow
"Reveal block test"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment