MDL-81872 course: Fix behat errors after improving reset
This commit is contained in:
@@ -31,10 +31,10 @@ Feature: Delete activity tags during course reset
|
||||
# Delete book chapter tags using course reset.
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I expand all fieldsets
|
||||
And I click on "Remove all book tags" "checkbox"
|
||||
And I click on "All book tags" "checkbox"
|
||||
And I press "Reset"
|
||||
# Confirm that book chapter tags are deleted.
|
||||
And I should see "Book tags have been deleted" in the "Books" "table_row"
|
||||
And I should see "All book tags" in the "Books" "table_row"
|
||||
And I press "Continue"
|
||||
And I am on the "Test Book" "book activity" page
|
||||
And I should not see "SampleTag"
|
||||
@@ -59,7 +59,7 @@ Feature: Delete activity tags during course reset
|
||||
# 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 "Remove all forum tags" "checkbox" should be <canbechecked>
|
||||
And the "All forum tags" "checkbox" should be <canbechecked>
|
||||
And I press "Reset"
|
||||
And I should see "<resetmessage>" in the "Forums" "table_row"
|
||||
And I press "Continue"
|
||||
@@ -71,9 +71,9 @@ Feature: Delete activity tags during course reset
|
||||
And I should not see "DiscussionTag"
|
||||
|
||||
Examples:
|
||||
| resetcheck | resetmessage | canbechecked | forumview |
|
||||
| Delete all posts | Delete all posts | disabled | should |
|
||||
| Remove all forum tags | Forum tags have been deleted | enabled | should not |
|
||||
| resetcheck | resetmessage | canbechecked | forumview |
|
||||
| All posts | All posts | disabled | should |
|
||||
| All forum tags | All forum tags | enabled | should not |
|
||||
|
||||
@javascript
|
||||
Scenario Outline: Delete glossary entry tags using course reuse
|
||||
@@ -93,7 +93,7 @@ Feature: Delete activity tags during course reset
|
||||
# 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 "Remove all glossary tags" "checkbox" should be <canbechecked>
|
||||
And the "All glossary tags" "checkbox" should be <canbechecked>
|
||||
And I press "Reset"
|
||||
And I should see "<resetmessage>" in the "Glossaries" "table_row"
|
||||
And I press "Continue"
|
||||
@@ -105,6 +105,6 @@ Feature: Delete activity tags during course reset
|
||||
And I should not see "GlossaryTag"
|
||||
|
||||
Examples:
|
||||
| resetcheck | resetmessage | canbechecked | glossaryview |
|
||||
| Delete entries from all glossaries | Delete entries from all glossaries | disabled | should |
|
||||
| Remove all glossary tags | Glossary tags have been deleted | enabled | should not |
|
||||
| resetcheck | resetmessage | canbechecked | glossaryview |
|
||||
| Entries from all glossaries | Entries from all glossaries | disabled | should |
|
||||
| All glossary tags | All glossary tags | enabled | should not |
|
||||
|
||||
@@ -48,7 +48,7 @@ Feature: Assign reset
|
||||
And I should see "Submitted for grading"
|
||||
When I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all submissions | 1 |
|
||||
| All submissions | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test assignment name" Activity page
|
||||
@@ -72,7 +72,7 @@ Feature: Assign reset
|
||||
And I should see "Sam1 Student1"
|
||||
When I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all user overrides | 1 |
|
||||
| All user overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on "Course 1" course homepage
|
||||
@@ -97,7 +97,7 @@ Feature: Assign reset
|
||||
And I should see "Group 1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all group overrides | 1 |
|
||||
| All group overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test assignment name" Activity page
|
||||
@@ -118,7 +118,7 @@ Feature: Assign reset
|
||||
And I should see "Sam1 Student1"
|
||||
When I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all submissions | 1 |
|
||||
| All submissions | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test assignment name" Activity page
|
||||
|
||||
@@ -46,7 +46,7 @@ Feature: Chat reset
|
||||
| reset_start_date[month] | January |
|
||||
| reset_start_date[year] | 2030 |
|
||||
And I press "Reset course"
|
||||
And I should see "Date changed" in the "Chats" "table_row"
|
||||
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"
|
||||
|
||||
@@ -40,9 +40,9 @@ Feature: Teacher can reset H5P activity grades
|
||||
When I am on the "Course 1" "reset" page
|
||||
And I expand all fieldsets
|
||||
# Check `Delete all grades` in course reset page to reset grades
|
||||
And I click on "Delete all grades" "checkbox"
|
||||
And I click on "All grades" "checkbox"
|
||||
And I press "Reset"
|
||||
Then I should see "OK" in the "Gradebook" "table_row"
|
||||
Then I should see "Done" in the "Gradebook" "table_row"
|
||||
And I press "Continue"
|
||||
# Confirm that previously saved grades are gone
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
|
||||
@@ -46,7 +46,7 @@ Feature: Lesson reset
|
||||
And I should see "Sam1 Student1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all lesson attempts | 1 |
|
||||
| All lesson attempts | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test lesson name" "lesson activity" page
|
||||
@@ -65,7 +65,7 @@ Feature: Lesson reset
|
||||
And I should see "Sam1 Student1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all user overrides | 1 |
|
||||
| All user overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test lesson name" "lesson activity" page
|
||||
@@ -84,7 +84,7 @@ Feature: Lesson reset
|
||||
And I should see "Group 1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all group overrides | 1 |
|
||||
| All group overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test lesson name" "lesson activity" page
|
||||
|
||||
@@ -40,7 +40,7 @@ Feature: Quiz reset
|
||||
When I log in as "teacher1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all quiz attempts | 1 |
|
||||
| All quiz attempts | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test quiz name" "mod_quiz > Grades report" page
|
||||
@@ -52,7 +52,7 @@ Feature: Quiz reset
|
||||
| Test quiz name | student1 | 2 |
|
||||
When I log in as "teacher1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I set the field "Delete all user overrides" to "1"
|
||||
And I set the field "All user overrides" to "1"
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test quiz name" "mod_quiz > User overrides" page
|
||||
@@ -65,7 +65,7 @@ Feature: Quiz reset
|
||||
When I log in as "teacher1"
|
||||
And I am on the "Course 1" "reset" page
|
||||
And I set the following fields to these values:
|
||||
| Delete all group overrides | 1 |
|
||||
| All group overrides | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on the "Test quiz name" "mod_quiz > Group overrides" page
|
||||
|
||||
@@ -42,13 +42,13 @@ Feature: Teachers can reset wiki pages, tags and files
|
||||
|
||||
Scenario: Reset page, tags and files
|
||||
Given I set the following fields to these values:
|
||||
| Delete all wiki pages | 1 |
|
||||
| Remove all wiki tags | 1 |
|
||||
| All wiki pages | 1 |
|
||||
| All wiki tags | 1 |
|
||||
| reset_wiki_comments | 1 |
|
||||
And I press "Reset course"
|
||||
And I should see "Delete all wiki pages"
|
||||
And I should see "Wiki tags have been deleted"
|
||||
And I should see "Delete all comments"
|
||||
And I should see "All wiki pages"
|
||||
And I should see "All wiki tags"
|
||||
And I should see "All comments"
|
||||
And I press "Continue"
|
||||
And I am on the "Test wiki name" "wiki activity" page
|
||||
And I press "Create page"
|
||||
@@ -62,11 +62,11 @@ Feature: Teachers can reset wiki pages, tags and files
|
||||
|
||||
Scenario: Reset only tags
|
||||
Given I set the following fields to these values:
|
||||
| Remove all wiki tags | 1 |
|
||||
| All wiki tags | 1 |
|
||||
When I press "Reset course"
|
||||
And I should not see "Delete all wiki pages"
|
||||
And I should see "Wiki tags have been deleted"
|
||||
And I should not see "Delete all comments"
|
||||
And I should not see "All wiki pages"
|
||||
And I should see "All wiki tags"
|
||||
And I should not see "All comments"
|
||||
And I press "Continue"
|
||||
And I am on the "Test wiki name" "wiki activity" page
|
||||
Then I should not see "Test tag 1"
|
||||
@@ -80,9 +80,9 @@ Feature: Teachers can reset wiki pages, tags and files
|
||||
Given I set the following fields to these values:
|
||||
| reset_wiki_comments | 1 |
|
||||
When I press "Reset course"
|
||||
And I should not see "Delete all wiki pages"
|
||||
And I should not see "Wiki tags have been deleted"
|
||||
And I should see "Delete all comments"
|
||||
And I should not see "All wiki pages"
|
||||
And I should not see "All wiki tags"
|
||||
And I should see "All comments"
|
||||
And I press "Continue"
|
||||
And I am on the "Test wiki name" "wiki activity" page
|
||||
Then I should see "Test tag 1"
|
||||
|
||||
Reference in New Issue
Block a user