Skip to content

Commit

Permalink
MDL-59370 behat: Behat fixes for enrolled users
Browse files Browse the repository at this point in the history
We removed the enrolled users page, so we need to update the behats that were using it.
  • Loading branch information
Damyon Wiese committed Aug 14, 2017
1 parent 4b50765 commit 5dd94c8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 80 deletions.
9 changes: 4 additions & 5 deletions enrol/meta/tests/behat/enrol_meta.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 1 addition & 13 deletions enrol/tests/behat/add_to_group.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
61 changes: 0 additions & 61 deletions enrol/tests/behat/filter_enrolled_users.feature

This file was deleted.

2 changes: 1 addition & 1 deletion grade/tests/behat/grade_average.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5dd94c8

Please sign in to comment.