MDL-81866 course: Fix behat errors after improving reset
This commit is contained in:
@@ -22,7 +22,9 @@ Feature: Delete activity tags during course reset
|
||||
# Perform course reset without checking anything.
|
||||
And I log in as "admin"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I press "Reset"
|
||||
And I press "Deselect all"
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I press "Continue"
|
||||
# Confirm that book chapter tags are not deleted.
|
||||
When I am on the "Test Book" "book activity" page
|
||||
@@ -30,9 +32,10 @@ Feature: Delete activity tags during course reset
|
||||
And I should see "ChapterTag"
|
||||
# Delete book chapter tags using course reset.
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I expand all fieldsets
|
||||
And I press "Deselect all"
|
||||
And I click on "All book tags" "checkbox"
|
||||
And I press "Reset"
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
# Confirm that book chapter tags are deleted.
|
||||
And I should see "All book tags" in the "Books" "table_row"
|
||||
And I press "Continue"
|
||||
@@ -47,7 +50,9 @@ Feature: Delete activity tags during course reset
|
||||
| admin | forum1 | Discussion 1 | Discussion 1 message | SampleTag, DiscussionTag |
|
||||
# Perform course reset without checking anything.
|
||||
And I am on the "Course 1" "reset" page logged in as admin
|
||||
And I press "Reset"
|
||||
And I press "Deselect all"
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I press "Continue"
|
||||
# Confirm that forum discussion tags are not deleted.
|
||||
When I am on the "Test Forum" "forum activity" page
|
||||
@@ -55,12 +60,13 @@ Feature: Delete activity tags during course reset
|
||||
Then I should see "SampleTag"
|
||||
And I should see "DiscussionTag"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I expand all fieldsets
|
||||
And I press "Deselect all"
|
||||
# Depending on <resetcheck> value, either delete all discussion posts or remove all forum discussion tags only.
|
||||
And I click on "<resetcheck>" "checkbox"
|
||||
# Confirm `Remove all forum tags` is disabled when `Delete all posts` on previous step is checked.
|
||||
And the "All forum tags" "checkbox" should be <canbechecked>
|
||||
And I press "Reset"
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I should see "<resetmessage>" in the "Forums" "table_row"
|
||||
And I press "Continue"
|
||||
And I am on the "Test Forum" "forum activity" page
|
||||
@@ -82,19 +88,22 @@ Feature: Delete activity tags during course reset
|
||||
| Test Glossary | Aubergine | Also eggpgplant | admin | SampleTag, GlossaryTag |
|
||||
# Perform course reset without checking anything.
|
||||
And I am on the "Course 1" "reset" page logged in as admin
|
||||
And I press "Reset"
|
||||
And I press "Deselect all"
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I press "Continue"
|
||||
# Confirm that glossary entry tags are not deleted.
|
||||
When I am on the "Test Glossary" "glossary activity" page
|
||||
Then I should see "SampleTag"
|
||||
And I should see "GlossaryTag"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I expand all fieldsets
|
||||
And I press "Deselect all"
|
||||
# Depending on <resetcheck> value, either delete all glossary entries or remove all glossary entry tags only.
|
||||
And I click on "<resetcheck>" "checkbox"
|
||||
# Confirm `Remove all forum tags` is disabled when `Delete entries from all glossaries` on previous step is checked.
|
||||
And the "All glossary tags" "checkbox" should be <canbechecked>
|
||||
And I press "Reset"
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I should see "<resetmessage>" in the "Glossaries" "table_row"
|
||||
And I press "Continue"
|
||||
And I am on the "Test Glossary" "glossary activity" page
|
||||
|
||||
@@ -56,7 +56,7 @@ Feature: Assign reset
|
||||
Then I should not see "Submitted for grading"
|
||||
|
||||
@javascript
|
||||
Scenario: Use course reset to remove user overrides.
|
||||
Scenario: Use course reset to remove user overrides
|
||||
And I am on the "Test assignment name" Activity page logged in as teacher1
|
||||
And I navigate to "Overrides" in current page administration
|
||||
And I press "Add user override"
|
||||
@@ -71,9 +71,11 @@ Feature: Assign reset
|
||||
And I press "Save"
|
||||
And I should see "Sam1 Student1"
|
||||
When I am on the "Course 1" "reset" page
|
||||
And I press "Deselect all"
|
||||
And I set the following fields to these values:
|
||||
| All user overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I press "Continue"
|
||||
And I am on "Course 1" course homepage
|
||||
And I click on "Test assignment name" "link" in the "region-main" "region"
|
||||
|
||||
@@ -21,9 +21,9 @@ Feature: Chat reset
|
||||
| activity | name | Description | course | idnumber |
|
||||
| chat | Test chat name | Test chat description | C1 | chat1 |
|
||||
|
||||
@javascript
|
||||
Scenario: Use course reset to update chat start date
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
Given I am on the "Course 1" "course" page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| startdate[day] | 1 |
|
||||
@@ -40,16 +40,17 @@ Feature: Chat reset
|
||||
| chattime[minute] | 00 |
|
||||
And I press "Save and display"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I press "Deselect all"
|
||||
And I set the following fields to these values:
|
||||
| reset_start_date[enabled] | 1 |
|
||||
| reset_start_date[day] | 1 |
|
||||
| reset_start_date[month] | January |
|
||||
| reset_start_date[year] | 2030 |
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I should see "Date" in the "Chats" "table_row"
|
||||
And I press "Continue"
|
||||
Then I am on "Course 1" course homepage
|
||||
And I follow "Test chat name"
|
||||
Then I follow "Test chat name"
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And the "chattime[year]" select box should contain "2030"
|
||||
|
||||
@@ -38,10 +38,11 @@ Feature: Teacher can reset H5P activity grades
|
||||
And I should see "5.00" in the "Second Student" "table_row"
|
||||
And I should see "0.00" in the "Third Student" "table_row"
|
||||
When I am on the "Course 1" "reset" page
|
||||
And I expand all fieldsets
|
||||
And I press "Deselect all"
|
||||
# Check `Delete all grades` in course reset page to reset grades
|
||||
And I click on "All grades" "checkbox"
|
||||
And I press "Reset"
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
Then I should see "Done" in the "Gradebook" "table_row"
|
||||
And I press "Continue"
|
||||
# Confirm that previously saved grades are gone
|
||||
|
||||
@@ -54,7 +54,7 @@ Feature: Lesson reset
|
||||
Then I should see "No attempts have been made on this lesson"
|
||||
|
||||
@javascript
|
||||
Scenario: Use course reset to remove user overrides.
|
||||
Scenario: Use course reset to remove user overrides
|
||||
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
And I navigate to "Overrides" in current page administration
|
||||
And I follow "Add user override"
|
||||
@@ -64,15 +64,18 @@ Feature: Lesson reset
|
||||
And I press "Save"
|
||||
And I should see "Sam1 Student1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I press "Deselect all"
|
||||
And I set the following fields to these values:
|
||||
| All user overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I press "Continue"
|
||||
And I am on the "Test lesson name" "lesson activity" page
|
||||
And I navigate to "Overrides" in current page administration
|
||||
Then I should not see "Sam1 Student1"
|
||||
|
||||
Scenario: Use course reset to remove group overrides.
|
||||
@javascript
|
||||
Scenario: Use course reset to remove group overrides
|
||||
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
And I navigate to "Overrides" in current page administration
|
||||
And I select "Group overrides" from the "jump" singleselect
|
||||
@@ -83,9 +86,11 @@ Feature: Lesson reset
|
||||
And I press "Save"
|
||||
And I should see "Group 1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I press "Deselect all"
|
||||
And I set the following fields to these values:
|
||||
| All group overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I press "Continue"
|
||||
And I am on the "Test lesson name" "lesson activity" page
|
||||
And I navigate to "Overrides" in current page administration
|
||||
|
||||
@@ -41,11 +41,13 @@ Feature: Teachers can reset wiki pages, tags and files
|
||||
And I am on the "Course 1" "reset" page
|
||||
|
||||
Scenario: Reset page, tags and files
|
||||
Given I set the following fields to these values:
|
||||
| All wiki pages | 1 |
|
||||
| All wiki tags | 1 |
|
||||
Given I press "Deselect all"
|
||||
And I set the following fields to these values:
|
||||
| All wiki pages | 1 |
|
||||
| All wiki tags | 1 |
|
||||
| reset_wiki_comments | 1 |
|
||||
And I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I should see "All wiki pages"
|
||||
And I should see "All wiki tags"
|
||||
And I should see "All comments"
|
||||
@@ -61,9 +63,11 @@ Feature: Teachers can reset wiki pages, tags and files
|
||||
And I should not see "empty.txt"
|
||||
|
||||
Scenario: Reset only tags
|
||||
Given I set the following fields to these values:
|
||||
Given I press "Deselect all"
|
||||
And I set the following fields to these values:
|
||||
| All wiki tags | 1 |
|
||||
When I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I should not see "All wiki pages"
|
||||
And I should see "All wiki tags"
|
||||
And I should not see "All comments"
|
||||
@@ -77,9 +81,11 @@ Feature: Teachers can reset wiki pages, tags and files
|
||||
And I should see "empty.txt"
|
||||
|
||||
Scenario: Reset only comments
|
||||
Given I set the following fields to these values:
|
||||
Given I press "Deselect all"
|
||||
And I set the following fields to these values:
|
||||
| reset_wiki_comments | 1 |
|
||||
When I press "Reset course"
|
||||
And I click on "Reset course" "button" in the "Reset course?" "dialogue"
|
||||
And I should not see "All wiki pages"
|
||||
And I should not see "All wiki tags"
|
||||
And I should see "All comments"
|
||||
|
||||
@@ -32,11 +32,11 @@ Feature: Course reuse navigation
|
||||
Then I should see "<content>"
|
||||
|
||||
Examples:
|
||||
| adminpage | content |
|
||||
| Backup | Backup settings |
|
||||
| Restore | Upload a backup file |
|
||||
| Import | Find a course to import data from: |
|
||||
| Reset | Delete all user data and reset this course to its original state |
|
||||
| adminpage | content |
|
||||
| Backup | Backup settings |
|
||||
| Restore | Upload a backup file |
|
||||
| Import | Find a course to import data from: |
|
||||
| Reset | This feature allows you to clear all user data and reset the course to its original state |
|
||||
|
||||
Scenario: An Administrator can view the course copy page.
|
||||
Given I log in as "admin"
|
||||
|
||||
Reference in New Issue
Block a user