MDL-59370 behat: Behat fixes for enrolled users
We removed the enrolled users page, so we need to update the behats that were using it.
This commit is contained in:
@@ -41,9 +41,8 @@ Feature: Enrolments are synchronised with meta courses
|
||||
And I add "Course meta link" enrolment method with:
|
||||
| Link course | C1C1 |
|
||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||
Then I should see "Student 1"
|
||||
And I should see "Student 4"
|
||||
And I should not see "Groupcourse" in the "table.userenrolment" "css_element"
|
||||
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
|
||||
@@ -105,8 +104,8 @@ Feature: Enrolments are synchronised with meta courses
|
||||
And I should see "Groupcourse 1" in the "Student 2" "table_row"
|
||||
And I should see "Groupcourse 1" in the "Student 3" "table_row"
|
||||
And I should see "Groupcourse 1" in the "Student 4" "table_row"
|
||||
And I should see "Course 2" in the "Student 1" "table_row"
|
||||
And I should not see "Course 2" in the "Student 3" "table_row"
|
||||
And I click on "[data-enrolinstancename='Course meta link (Course 2)'] a[data-action=showdetails]" "css_element" in the "Student 1" "table_row"
|
||||
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
|
||||
|
||||
@@ -23,7 +23,7 @@ Feature: Users can be added to multiple groups at once
|
||||
| student1 | C1 | editingteacher |
|
||||
|
||||
@javascript
|
||||
Scenario: Adding a user to one group
|
||||
Scenario: Adding a user to multiple groups
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Participants"
|
||||
@@ -35,15 +35,3 @@ Feature: Users can be added to multiple groups at once
|
||||
And I press key "27" in the field "Edit groups for \"Student 1\""
|
||||
And I click on "Save changes" "link" in the "student1" "table_row"
|
||||
Then I should see "Group 1, Group 2"
|
||||
|
||||
@javascript
|
||||
Scenario: Adding a user to multiple group
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||
And I click on "Add user into group" "link" in the "student1" "table_row"
|
||||
When I set the field "Add user into group" to "Group 1, Group 2, Group 3"
|
||||
And I press "Save changes"
|
||||
Then I should see "Group 1"
|
||||
And I should see "Group 2"
|
||||
And I should see "Group 3"
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
@core_enrol @core_group
|
||||
Feature: Enrolled users can be filtered by group
|
||||
In order to filter the list of enrolled users
|
||||
As a teacher
|
||||
I need to visit the enrolled users page and select a group to filter by
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname |
|
||||
| Course 1 | C1 |
|
||||
| Course 2 | C2 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname |
|
||||
| student1 | Student | 1 |
|
||||
| student2 | Student | 2 |
|
||||
| student3 | Student | 3 |
|
||||
| teacher1 | Teacher | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| student3 | C1 | student |
|
||||
| student1 | C2 | student |
|
||||
| student2 | C2 | student |
|
||||
| student3 | C2 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| teacher1 | C2 | editingteacher |
|
||||
And the following "groups" exist:
|
||||
| name | course | idnumber |
|
||||
| Group 1 | C1 | G1 |
|
||||
| Group 2 | C1 | G2 |
|
||||
| Group 3 | C2 | G3 |
|
||||
And the following "group members" exist:
|
||||
| user | group |
|
||||
| student2 | G1 |
|
||||
| student2 | G2 |
|
||||
| student3 | G2 |
|
||||
| student1 | G3 |
|
||||
|
||||
Scenario Outline:
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||
|
||||
When I set the field "Group" to "<group>"
|
||||
And I press "Filter"
|
||||
|
||||
Then I should see "<expected1>"
|
||||
And I should see "<expected2>"
|
||||
And I should see "<expected3>"
|
||||
And I should not see "<notexpected1>"
|
||||
And I should not see "<notexpected2>"
|
||||
And I should see "<expected4>"
|
||||
|
||||
# Note the 'XX-IGNORE-XX' elements are for when there is less than 2 'not expected' items.
|
||||
Examples:
|
||||
| group | expected1 | expected2 | expected3 | expected4 | notexpected1 | notexpected2 |
|
||||
| All participants | Student 1 | Student 2 | Student 3 | 4 enrolled users | XX-IGNORE-XX | XX-IGNORE-XX |
|
||||
| No group | Student 1 | | | 2 enrolled users | Student 2 | Student 3 |
|
||||
| Group 1 | Student 2 | | | 1 enrolled users | Student 1 | Student 3 |
|
||||
| Group 2 | Student 2 | Student 3 | | 2 enrolled users | Student 1 | XX-IGNORE-XX |
|
||||
@@ -43,7 +43,7 @@ Feature: Average grades are displayed in the gradebook
|
||||
And I turn editing mode off
|
||||
# Suspend a user
|
||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||
And I click on "Edit" "link" in the "Student 2" "table_row"
|
||||
And I click on "Edit enrolment" "link" in the "Student 2" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Status | Suspended |
|
||||
And I press "Save changes"
|
||||
|
||||
Reference in New Issue
Block a user