MDL-69364 enrol: Improve cohort test

This commit is contained in:
Andrew Nicols 2021-09-20 10:39:50 +08:00
parent 5ea3545115
commit 9fb596408d

View file

@ -27,8 +27,7 @@ Feature: Viewing the list of cohorts to enrol in a course
| moodle/cohort:manage | Prohibit | | moodle/cohort:manage | Prohibit |
| moodle/cohort:view | Prohibit | | moodle/cohort:view | Prohibit |
And I log out And I log out
And I log in as "teacher1" And I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
And I navigate to course participants And I navigate to course participants
When I press "Enrol users" When I press "Enrol users"
Then I should not see "Select cohorts" Then I should not see "Select cohorts"
@ -40,8 +39,7 @@ Feature: Viewing the list of cohorts to enrol in a course
| name | Test cohort name | | name | Test cohort name |
| idnumber | 1337 | | idnumber | 1337 |
| description | Test cohort description | | description | Test cohort description |
And I log in as "teacher1" And I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
And I navigate to course participants And I navigate to course participants
When I press "Enrol users" When I press "Enrol users"
Then I should see "Select cohorts" Then I should see "Select cohorts"
@ -49,8 +47,7 @@ Feature: Viewing the list of cohorts to enrol in a course
@javascript @javascript
Scenario: Check we do not show the cohorts field if there are none present Scenario: Check we do not show the cohorts field if there are none present
Given I log in as "teacher1" Given I am on the "Course 1" course page logged in as teacher1
And I am on "Course 1" course homepage
And I navigate to course participants And I navigate to course participants
When I press "Enrol users" When I press "Enrol users"
Then I should not see "Select cohorts" Then I should not see "Select cohorts"