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
......@@ -250,7 +250,7 @@ Feature: Test category management actions
# Redirect
And I should see "Assign roles in Category: Cat 1"
And I should see "Please choose a role to assign"
And I click on "Back" "button"
And I follow "Manage this category"
# Redirect
And I should see the "Course categories and courses" management page
And "Cat 1" "link" should exist in the "#category-listing" "css_element"
......
......@@ -29,8 +29,7 @@ Feature: Keyholder role is listed as course contact
And the following "courses" exist:
| fullname | shortname | format | coursedisplay | numsections | category |
| Course 1 | C1 | topics | 0 | 5 | CAT1 |
And I am on "Course 1" course homepage
And I add "Self enrolment" enrolment method with:
And I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
| Enrolment key | letmein |
And I log out
......
......@@ -33,8 +33,7 @@ Feature: Restrict activities availability
Given I log in as "admin"
And I set the following system permissions of "Teacher" role:
| mod/chat:addinstance | Prohibit |
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:
| mod/glossary:addinstance | Prohibit |
And I log out
......
......@@ -19,9 +19,7 @@ Feature: Enrol multiple cohorts
@javascript
Scenario: Add multiple cohorts to the course
When I log in as "teacher001"
And I am on "Course 001" course homepage
And I navigate to course participants
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 001" "enrolment methods" page
And I select "Cohort sync" from the "Add method" singleselect
And I open the autocomplete suggestions list
And I click on "Alpha1" item in the autocomplete list
......
......@@ -28,16 +28,13 @@ Feature: Unenrol action to disable course enrolment
@javascript @skip_chrome_zerosize
Scenario: Removing the user from the cohort will suspend the enrolment but keep the role
When I log in as "teacher001"
And I am on "Course 001" course homepage
And I navigate to course participants
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 001" "enrolment methods" page
And I select "Cohort sync" from the "Add method" singleselect
And I open the autocomplete suggestions list
Then "System cohort" "autocomplete_suggestions" should exist
And I set the field "Cohort" to "System cohort"
And I press "Add method"
And I am on "Course 001" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 001" "enrolled users" page
And I should see "student001@example.com"
And I should see "student002@example.com"
And I should see "student003@example.com"
......@@ -63,16 +60,13 @@ Feature: Unenrol action to disable course enrolment
@javascript @skip_chrome_zerosize
Scenario: Deleting non-empty cohort will suspend the enrolment but keep the role
When I log in as "teacher001"
And I am on "Course 001" course homepage
And I navigate to course participants
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 001" "enrolment methods" page
And I select "Cohort sync" from the "Add method" singleselect
And I open the autocomplete suggestions list
Then "System cohort" "autocomplete_suggestions" should exist
And I set the field "Cohort" to "System cohort"
And I press "Add method"
And I am on "Course 001" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 001" "enrolled users" page
And I should see "student001@example.com"
And I should see "student002@example.com"
And I should see "student003@example.com"
......
......@@ -25,8 +25,7 @@ Feature: Signing up for a course with a fee enrolment method
@javascript
Scenario: Student can see the payment prompt on the course enrolment page
When I log in as "manager1"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 1" "enrolment methods" page
And I select "Enrolment on payment" from the "Add method" singleselect
And I set the following fields to these values:
| Payment account | Account1 |
......
......@@ -23,11 +23,12 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
| intro | Test forum description |
| section | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I am on "Course 1" course homepage
And I turn editing mode on
And I am on the "Course 1" "enrolment methods" page
Scenario: Allow guest access without password
Given I navigate to "Users > Enrolment methods" in current page administration
And I click on "Edit" "link" in the "Guest access" "table_row"
Given I click on "Edit" "link" in the "Guest access" "table_row"
And I set the following fields to these values:
| Allow guest access | Yes |
And I press "Save changes"
......@@ -38,8 +39,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
Then I should not see "Subscribe to this forum"
Scenario: Allow guest access with password
Given I navigate to "Users > Enrolment methods" in current page administration
And I click on "Edit" "link" in the "Guest access" "table_row"
Given I click on "Edit" "link" in the "Guest access" "table_row"
And I set the following fields to these values:
| Allow guest access | Yes |
| Password | moodle_rules |
......
......@@ -30,8 +30,7 @@ Feature: Check that settings are adhered to when creating an enrolment plugin
Scenario: As an admin set site-wide settings for the enrolment plugin and ensure they are used
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 1" "enrolment methods" page
And I select "Publish as LTI tool" from the "Add method" singleselect
When I expand all fieldsets
Then the field "Email display" matches value "Allow everyone to see my email address"
......
......@@ -24,8 +24,8 @@ Feature: Check that the page listing the shared external tools is functioning as
Scenario: I want to edit an external tool
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "Users > Enrolment methods" in current page administration
And I turn editing mode on
And I am on the "Course 1" "enrolment methods" page
And I select "Publish as LTI tool" from the "Add method" singleselect
And I set the following fields to these values:
| Custom instance name | Assignment - LTI |
......
......@@ -25,8 +25,7 @@ Feature: A teacher can manage manually enrolled users in their course
| capability | permission | role | contextlevel | reference |
| moodle/site:viewfullnames | <permission> | editingteacher | Course | C1 |
When I log in as "teacher"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 1" "enrolment methods" page
And I click on "Enrol users" "link" in the "Manual enrolments" "table_row"
And I set the field "addselect_searchtext" to "First"
And I wait "1" seconds
......@@ -50,8 +49,7 @@ Feature: A teacher can manage manually enrolled users in their course
| user1 | C1 | student |
| user2 | C1 | student |
When I log in as "teacher"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 1" "enrolment methods" page
And I click on "Enrol users" "link" in the "Manual enrolments" "table_row"
And I set the field "removeselect_searchtext" to "First"
And I wait "1" seconds
......
......@@ -37,25 +37,20 @@ Feature: Enrolments are synchronised with meta courses
And I am on course index
Scenario: Add meta enrolment instance without groups
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
When I add "Course meta link" enrolment method in "Course 3" with:
| Link course | C1C1 |
And I am on "Course 3" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 3" "enrolled users" page
Then I should see "No groups" in the "Student 1" "table_row"
And I should see "No groups" in the "Student 4" "table_row"
Scenario: Add meta enrolment instance with groups
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
When I add "Course meta link" enrolment method in "Course 3" with:
| Link course | C1C1 |
| Add to group | Groupcourse 1 |
And I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
And I add "Course meta link" enrolment method in "Course 3" with:
| Link course | C2C2 |
| Add to group | Groupcourse 2 |
And I am on "Course 3" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 3" "enrolled users" page
Then I should see "Groupcourse 1" in the "Student 1" "table_row"
And I should see "Groupcourse 1" in the "Student 2" "table_row"
And I should see "Groupcourse 1" in the "Student 3" "table_row"
......@@ -66,26 +61,22 @@ Feature: Enrolments are synchronised with meta courses
And I should not see "Groupcourse 2" in the "Student 4" "table_row"
Scenario: Add meta enrolment instance with auto-created groups
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
When I add "Course meta link" enrolment method in "Course 3" with:
| Link course | C1C1 |
| Add to group | Create new group |
And I am on "Course 3" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 3" "enrolled users" page
Then I should see "Course 1 course" in the "Student 1" "table_row"
And I should see "Course 1 course" in the "Student 2" "table_row"
And I should see "Course 1 course" in the "Student 3" "table_row"
And I should see "Course 1 course" in the "Student 4" "table_row"
And I navigate to "Users > Groups" in current page administration
And I am on the "Course 3" "groups" page
And the "Groups" select box should contain "Course 1 course (4)"
Scenario: Backup and restore of meta enrolment instance
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
When I add "Course meta link" enrolment method in "Course 3" with:
| Link course | C1C1 |
| Add to group | Groupcourse 1 |
And I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
And I add "Course meta link" enrolment method in "Course 3" with:
| Link course | C2C2 |
When I backup "Course 3" course using this options:
| Confirmation | Filename | test_backup.mbz |
......@@ -98,12 +89,10 @@ Feature: Enrolments are synchronised with meta courses
And I press "Next"
And I press "Perform restore"
And I trigger cron
And I am on "Course 5 copy 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I am on the "Course 5 copy 1" "enrolment methods" page
Then I should see "Course meta link (Course 1)"
And I should see "Course meta link (Course 2)"
And I am on "Course 5 copy 1" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 5 copy 1" "enrolled users" page
And I should see "Groupcourse 1" in the "Student 1" "table_row"
And I should see "Groupcourse 1" in the "Student 2" "table_row"
And I should see "Groupcourse 1" in the "Student 3" "table_row"
......@@ -112,8 +101,7 @@ Feature: Enrolments are synchronised with meta courses
And I should see "Course meta link (Course 2)" in the "Enrolment method" "table_row"
Scenario: Unenrol a user from the course participants page that was enrolled via course meta link.
Given I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
Given I add "Course meta link" enrolment method in "Course 3" with:
| Link course | C4C4 |
And I navigate to course participants
# Suspended users can be unenrolled.
......
......@@ -34,8 +34,7 @@ Feature: Users can be defined as key holders in courses where self enrolment is
@javascript
Scenario: The key holder name is displayed on site home page
Given I log in as "admin"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
When I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
| Enrolment key | moodle_rules |
And I log out
......
......@@ -21,8 +21,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
@javascript
Scenario: Self-enrolment enabled as guest
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I add "Self enrolment" enrolment method with:
And I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
And I log out
When I am on "Course 1" course homepage
......@@ -33,8 +32,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Scenario: Self-enrolment enabled
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
When I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
And I log out
And I log in as "student1"
......@@ -45,8 +43,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Scenario: Self-enrolment enabled requiring an enrolment key
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
When I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
| Enrolment key | moodle_rules |
And I log out
......@@ -66,13 +63,11 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Scenario: Self-enrolment enabled requiring a group enrolment key
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
When I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
| Enrolment key | moodle_rules |
| Use group enrolment keys | Yes |
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 1 |
......@@ -91,8 +86,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
@javascript
Scenario: Edit a self-enrolled user's enrolment from the course participants page
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
When I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
And I log out
And I log in as "student1"
......@@ -112,8 +106,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
@javascript
Scenario: Unenrol a self-enrolled student from the course participants page
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
When I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
And I log out
And I log in as "student1"
......@@ -133,7 +126,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Given the "multilang" filter is "on"
And the "multilang" filter applies to "content and headings"
And I am on the "C1" "Course" page logged in as "teacher1"
When I add "Self enrolment" enrolment method with:
When I add "Self enrolment" enrolment method in "Course 1" with:
| Custom instance name | Test student enrolment |
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
......
......@@ -16,12 +16,11 @@ Feature: User can be enrolled into a course
Scenario: User can be enrolled without javascript
When I enrol "Studie One" user as "Student"
And I am on "Course 001" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 001" "Enrolled users" page
Then I should see "Studie One"
@javascript
Scenario: User can be enrolled with javascript enrol element
When I enrol "Studie One" user as "Student"
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 001" "Enrolled users" page
Then I should see "Studie One"
......@@ -21,8 +21,7 @@ Feature: Test role visibility for the participants page
Scenario: Check the default roles are visible
Given I log in as "manager1"
And I am on "Course 1" course homepage
When I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 1" "enrolled users" page
Then "Learner 1" row "Roles" column of "participants" table should contain "Student"
And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher"
And "Manager 1" row "Roles" column of "participants" table should contain "Manager"
......@@ -30,8 +29,7 @@ Feature: Test role visibility for the participants page
Scenario: Do not allow managers to view any roles but manager and check they are hidden
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 1" "enrolled users" page
Then "Learner 1" row "Roles" column of "participants" table should contain "Student"
And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher"
And "Manager 1" row "Roles" column of "participants" table should not contain "Manager"
......
......@@ -42,8 +42,7 @@ Feature: Average grades are displayed in the gradebook
And I press "Save changes"
And I turn editing mode off
# Suspend a user
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolled users" in current page administration
And I am on the "Course 1" "enrolled users" page
And I click on "Edit enrolment" "link" in the "Student 2" "table_row"
And I set the following fields to these values:
| Status | Suspended |
......
......@@ -37,8 +37,7 @@ Feature: Automatic creation of groups
| student10 | C1 | student | 0 |
| suspendedstudent11 | C1 | student | 1 |
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
When I press "Auto-create groups"
And I expand all fieldsets
......@@ -171,8 +170,7 @@ Feature: Automatic creation of groups
| moodle/course:viewsuspendedusers | 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
When I press "Auto-create groups"
Then I should not see "Include only active enrolments"
And I set the field "Group/member count" to "11"
......
......@@ -24,8 +24,7 @@ Feature: Organize students into groups
| student2 | C1 | student |
| student3 | C1 | student |
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 1 |
......@@ -77,8 +76,7 @@ Feature: Organize students into groups
And the following config values are set as admin:
| showuseridentity | email,country |
And I log in as "teacher"
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 1 |
......@@ -106,8 +104,7 @@ Feature: Organize students into groups
| 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
When I press "Create group"
Then the "idnumber" "field" should be readonly
And I set the following fields to these values:
......@@ -128,8 +125,7 @@ Feature: Organize students into groups
| Course 1 | C1 | 0 | 1 |
| Course 2 | C2 | 0 | 1 |
And I log in as "admin"
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 press "Create group"
And I set the following fields to these values:
| Group name | Group A |
......@@ -150,8 +146,7 @@ Feature: Organize students into groups
| Enrolment key | Abcdef-2 |
And I press "Save changes"
And the "groups" select box should contain "Group B (0)"
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 |
......
......@@ -30,8 +30,8 @@ Feature: Custom profile fields in groups
@javascript
Scenario: Check the custom profile fields show up and can be searched on
When I am on the "C1" "Course" page logged in as "admin"
And I navigate to "Users > Groups" in current page administration
When I am logged in as "admin"
And I am on the "Course 1" "groups" page
# Check the Overview page.
And I select "Overview" from the "jump" singleselect
......
......@@ -15,8 +15,7 @@ Feature: Automatic deletion 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) |
......@@ -64,8 +63,7 @@ Feature: Automatic deletion 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
When I set the field "groups" to "Group (with ID) (0)"
Then the "Delete selected group" "button" should be disabled
And I set the field "groups" to "Group (without ID) (0)"
......
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