forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-74612 cohort: use data generator for populating cohort members.
- Loading branch information
1 parent
1a74403
commit 2fede32
Showing
2 changed files
with
12 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,10 @@ Feature: An administrator can filter user accounts by role, cohort and other pro | |
And the following "cohorts" exist: | ||
| name | idnumber | | ||
| Cohort 1 | CH1 | | ||
And the following "cohort members" exist: | ||
| user | cohort | | ||
| user2 | CH1 | | ||
| user3 | CH1 | | ||
And the following "courses" exist: | ||
| fullname | shortname | category | | ||
| Course 1 | C1 | 0 | | ||
|
@@ -27,8 +31,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro | |
| user2 | C1 | student | | ||
| user3 | C1 | student | | ||
And I log in as "admin" | ||
And I add "User Two ([email protected])" user to "CH1" cohort members | ||
And I add "User Three ([email protected])" user to "CH1" cohort members | ||
And I navigate to "Users > Accounts > Browse list of users" in site administration | ||
|
||
Scenario: Filter user accounts by role and cohort | ||
|
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 |
---|---|---|
|
@@ -405,6 +405,12 @@ Feature: Award badges based on cohort | |
| user1 | First | User | first@example.com | | ||
| user2 | Second | User | second@example.com | | ||
| user3 | Third | User | third@example.com | | ||
And the following "cohort members" exist: | ||
| user | cohort | | ||
| user1 | CH1 | | ||
| user1 | CH2 | | ||
| user2 | CH2 | | ||
| user2 | CH3 | | ||
And I log in as "admin" | ||
And I navigate to "Badges > Add a new badge" in site administration | ||
And I set the following fields to these values: | ||
|
@@ -419,7 +425,7 @@ Feature: Award badges based on cohort | |
And I press "Save" | ||
And I press "Enable access" | ||
When I press "Continue" | ||
And I should see "Recipients (0)" | ||
And I should see "Recipients (1)" | ||
And I navigate to "Badges > Add a new badge" in site administration | ||
And I set the following fields to these values: | ||
| Name | Site Badge 2 | | ||
|
@@ -433,11 +439,7 @@ Feature: Award badges based on cohort | |
And I press "Save" | ||
And I press "Enable access" | ||
And I press "Continue" | ||
Then I navigate to "Users > Accounts >Cohorts" in site administration | ||
And I add "First User ([email protected])" user to "CH1" cohort members | ||
And I add "First User ([email protected])" user to "CH2" cohort members | ||
And I add "Second User ([email protected])" user to "CH2" cohort members | ||
And I add "Second User ([email protected])" user to "CH3" cohort members | ||
And I should see "Recipients (1)" | ||
And I log out | ||
And I log in as "user1" | ||
And I follow "Profile" in the user menu | ||
|