forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-61564 enrol_cohort: Allow multiple cohort selection.
- Loading branch information
1 parent
1a9bee6
commit 988936e
Showing
2 changed files
with
63 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@enrol @enrol_cohort | ||
Feature: Enrol multiple cohorts | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher001 | Teacher | 001 | teacher001@example.com | | ||
And the following "cohorts" exist: | ||
| name | idnumber | visible | | ||
| Alpha1 | A1 | 1 | | ||
| Beta2 | B1 | 1 | | ||
And the following "courses" exist: | ||
| fullname | shortname | format | startdate | | ||
| Course 001 | C001 | weeks | ##1 month ago## | | ||
And the following "course enrolments" exist: | ||
| user | course | role | timestart | | ||
| teacher001 | C001 | editingteacher | ##1 month ago## | | ||
|
||
@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 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 | ||
And "Alpha1" "autocomplete_selection" should exist | ||
And I click on "Beta2" item in the autocomplete list | ||
And "Alpha1" "autocomplete_selection" should exist | ||
And "Beta2" "autocomplete_selection" should exist | ||
And I press "Add method" | ||
Then I should see "Cohort sync (Beta2 - Student)" | ||
And I should see "Cohort sync (Alpha1 - Student)" |