Skip to content
Snippets Groups Projects
Commit fb970762 authored by Chris Sangwin's avatar Chris Sangwin
Browse files

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
......@@ -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
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment