Commit fcd4de86 authored by Adrian Greeve's avatar Adrian Greeve
Browse files

MDL-72090 navigation: Update to behat feature files for navigation.

This updates feature files to use the new steps to navigate to certain
pages.
parent 8a5e36fa
......@@ -27,7 +27,7 @@ Feature: The description of a group can be viewed by students and teachers
And I set the following fields to these values:
| Group mode | Visible groups |
And I press "Save and display"
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I press "Create group"
And I set the following fields to these values:
| Group name | Group A |
......@@ -76,7 +76,7 @@ Feature: The description of a group can be viewed by students and teachers
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and display"
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I press "Create group"
And I set the following fields to these values:
| Group name | Group A |
......
......@@ -20,8 +20,7 @@ Feature: Importing of groups and groupings
@javascript
Scenario: Import groups and groupings as teacher
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I press "Import groups"
When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager
And I press "Import groups"
......@@ -55,8 +54,7 @@ Feature: Importing of groups and groupings
@javascript
Scenario: Import groups with idnumber when the user has proper permissions for the idnumber field
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I press "Import groups"
When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager
And I press "Import groups"
......@@ -91,14 +89,12 @@ Feature: Importing of groups and groupings
@javascript
Scenario: Import groups with idnumber when the user does not have proper permissions for the idnumber field
Given I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I am on the "Course 1" "permissions" page
And I override the system permissions of "Teacher" role with:
| moodle/course:changeidnumber | Prevent |
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I press "Import groups"
When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager
And I press "Import groups"
......@@ -127,8 +123,7 @@ Feature: Importing of groups and groupings
@javascript
Scenario: Import groups into multiple courses as a teacher
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I press "Import groups"
When I upload "group/tests/fixtures/groups_import_multicourse.csv" file to "Import" filemanager
And I press "Import groups"
......@@ -144,8 +139,7 @@ Feature: Importing of groups and groupings
And I should see "group8"
And I should not see "group9"
And I should not see "group-will-not-be-created"
And I am on "Course 2" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 2" "groups" page
And I should see "group9"
And I should not see "group-will-not-be-created"
And I should not see "group7"
......
......@@ -15,8 +15,7 @@ Feature: Uniqueness of Group ID number
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
Scenario: Group ID number uniqueness
Given I press "Create group"
......
......@@ -57,8 +57,7 @@ Feature: Group overview
Scenario: Filter the overview in various different ways
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I select "Overview" from the "jump" singleselect
# Grouping All and Group All filter
......
......@@ -29,8 +29,7 @@ Feature: Test role visibility for the groups management page
Scenario: Check the default roles are visible
Given I log in as "manager1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
When I set the field "groups" to "Group 1 (3)"
And I press "Show members for group"
Then "optgroup[label='No roles']" "css_element" should not exist in the "#members" "css_element"
......@@ -41,8 +40,7 @@ Feature: Test role visibility for the groups management page
Scenario: Do not allow managers to view any roles and check they are hidden
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
When I set the field "groups" to "Group 1 (3)"
And I press "Show members for group"
Then "optgroup[label='No roles']" "css_element" should exist in the "#members" "css_element"
......
......@@ -15,8 +15,7 @@ Feature: Automatic updating of groups and groupings
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I press "Create group"
And I set the following fields to these values:
| Group name | Group (without ID) |
......@@ -71,8 +70,7 @@ Feature: Automatic updating of groups and groupings
| moodle/course:changeidnumber | Prevent |
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I set the field "groups" to "Group (with ID)"
When I press "Edit group settings"
Then the "idnumber" "field" should be readonly
......@@ -108,8 +106,7 @@ Feature: Automatic updating of groups and groupings
| teacher1 | C2 | editingteacher |
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 1" "groups" page
And I set the field "groups" to "Group (with ID)"
And I press "Edit group settings"
And I set the following fields to these values:
......@@ -133,8 +130,7 @@ Feature: Automatic updating of groups and groupings
| Enrolment key | Abcdef-2 |
And I press "Save changes"
And I should not see "This enrolment key is already used for another group."
And I am on "Course 2" course homepage
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 2" "groups" page
And I press "Create group"
And I set the following fields to these values:
| Group name | Group A |
......
......@@ -16,8 +16,7 @@ Feature: Override permissions on a context
| teacher1 | C1 | editingteacher |
Scenario: Default system capabilities modification
Given I am on the "C1" "Course" page logged in as "admin"
And I navigate to "Users > Permissions" in current page administration
Given I am on the "C1" "permissions" page logged in as "admin"
When I click on "Allow" "icon" in the "mod/forum:addnews" "table_row"
And I press "Student"
Then "Add announcementsmod/forum:addnews" row "Roles with permission" column of "permissions" table should contain "Student"
......
......@@ -92,8 +92,7 @@ Feature: Create conversations for course's groups
Scenario: Check group conversation members are synced when a new group member is added
Given I log in as "teacher1"
Then I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
Then I am on the "Course 1" "groups" page
And I add "Student 4 (student4@example.com)" user to "Group 1" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I open messaging
......
......@@ -46,8 +46,7 @@ Feature: Assign reset
And I am on the "Test assignment name" Activity page logged in as teacher1
And I follow "View all submissions"
And I should see "Submitted for grading"
And I am on "Course 1" course homepage
When I navigate to "Reset" in current page administration
When I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all submissions | 1 |
And I press "Reset course"
......@@ -72,8 +71,7 @@ Feature: Assign reset
| duedate[minute] | 00 |
And I press "Save"
And I should see "Sam1 Student1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
When I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all user overrides | 1 |
And I press "Reset course"
......@@ -98,8 +96,7 @@ Feature: Assign reset
| duedate[minute] | 00 |
And I press "Save"
And I should see "Group 1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all group overrides | 1 |
And I press "Reset course"
......@@ -120,8 +117,7 @@ Feature: Assign reset
And I select "Reveal student identities" from the "Grading action" singleselect
And I press "Continue"
And I should see "Sam1 Student1"
And I am on "Course 1" course homepage
When I navigate to "Reset" in current page administration
When I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all submissions | 1 |
And I press "Reset course"
......
......@@ -14,8 +14,7 @@ Feature: Assignment with no calendar capabilites
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I am on the "C1" Course page logged in as admin
And I navigate to "Users > Permissions" in current page administration
And I am on the "C1" "permissions" page logged in as admin
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
......
......@@ -38,8 +38,7 @@ Feature: Chat reset
| chattime[hour] | 12 |
| chattime[minute] | 00 |
And I press "Save and display"
And I am on "Course 1" course homepage
When I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| reset_start_date[enabled] | 1 |
| reset_start_date[day] | 1 |
......
......@@ -22,8 +22,7 @@ Feature: Chat with no calendar capabilites
| intro | Test chat description |
| section | 1 |
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I am on the "Course 1" "permissions" page
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
......
......@@ -15,8 +15,7 @@ Feature: Choice with no calendar capabilites
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I am on the "Course 1" "permissions" page
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
......
......@@ -15,8 +15,7 @@ Feature: Database with no calendar capabilites
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I am on the "Course 1" "permissions" page
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
......
......@@ -15,8 +15,7 @@ Feature: Feedback with no calendar capabilites
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I am on the "Course 1" "permissions" page
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
......
......@@ -53,8 +53,7 @@ Feature: Lesson reset
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I navigate to "Reports" in current page administration
And I should see "Sam1 Student1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all lesson attempts | 1 |
And I press "Reset course"
......@@ -74,8 +73,7 @@ Feature: Lesson reset
| Re-takes allowed | 1 |
And I press "Save"
And I should see "Sam1 Student1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all user overrides | 1 |
And I press "Reset course"
......@@ -93,8 +91,7 @@ Feature: Lesson reset
| Re-takes allowed | 1 |
And I press "Save"
And I should see "Group 1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all group overrides | 1 |
And I press "Reset course"
......
......@@ -22,8 +22,7 @@ Feature: Lesson with no calendar capabilites
| intro | Test lesson description |
| section | 1 |
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I am on the "Course 1" "permissions" page
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
......
......@@ -66,8 +66,7 @@ Feature: Backup and restore of quizzes
@javascript @_file_upload
Scenario: Restore a Moodle 2.8 quiz backup
When I am on "Course 1" course homepage
And I navigate to "Restore" in current page administration
When I am on the "Course 1" "restore" page
And I press "Manage backup files"
And I upload "mod/quiz/tests/fixtures/moodle_28_quiz.mbz" file to "Files" filemanager
And I press "Save changes"
......
......@@ -35,8 +35,7 @@ Feature: Quiz with no calendar capabilites
| id_timeclose_month | 2 |
| id_timeclose_year | 2017 |
And I press "Save and return to course"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I am on the "Course 1" "permissions" page
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
......
......@@ -38,8 +38,7 @@ Feature: Quiz reset
Scenario: Use course reset to clear all attempt data
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all quiz attempts | 1 |
And I press "Reset course"
......@@ -52,8 +51,7 @@ Feature: Quiz reset
| quiz | user | attempts |
| Test quiz name | student1 | 2 |
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the field "Delete all user overrides" to "1"
And I press "Reset course"
And I press "Continue"
......@@ -65,8 +63,7 @@ Feature: Quiz reset
| quiz | group | attempts |
| Test quiz name | G1 | 2 |
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reset" in current page administration
And I am on the "Course 1" "reset" page
And I set the following fields to these values:
| Delete all group overrides | 1 |
And I press "Reset course"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment