AutorÃa | Ultima modificación | Ver Log |
@core @core_userFeature: Viewing the list of cohorts to enrol in a courseIn order to ensure we only display the cohorts when applicableAs a teacherI should only see the list of cohorts under some circumstancesBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com |And the following "courses" exist:| fullname | shortname || Course 1 | C1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher |@javascript @skip_chrome_zerosizeScenario: Check the teacher does not see the cohorts field without the proper capabilitiesGiven the following "cohort" exists:| name | Test cohort name || idnumber | 1337 || description | Test cohort description |And the following "role capability" exists:| role | editingteacher || moodle/cohort:manage | prohibit || moodle/cohort:view | prohibit |And I log outAnd I am on the "Course 1" course page logged in as teacher1And I navigate to course participantsWhen I press "Enrol users"Then I should not see "Select cohorts"And I should not see "Enrol selected users and cohorts"@javascriptScenario: Check we show the cohorts field if there are some presentGiven the following "cohort" exists:| name | Test cohort name || idnumber | 1337 || description | Test cohort description |And I am on the "Course 1" course page logged in as teacher1And I navigate to course participantsWhen I press "Enrol users"Then I should see "Select cohorts"And I should see "Enrol selected users and cohorts"@javascriptScenario: Check we do not show the cohorts field if there are none presentGiven I am on the "Course 1" course page logged in as teacher1And I navigate to course participantsWhen I press "Enrol users"Then I should not see "Select cohorts"And I should not see "Enrol selected users and cohorts"