1 |
efrain |
1 |
@core_enrol @core_group
|
|
|
2 |
Feature: Users can be added to multiple groups at once
|
|
|
3 |
In order to manage group membership effectively
|
|
|
4 |
As a user
|
|
|
5 |
I need to add another user to multiple groups
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | format |
|
|
|
14 |
| Course 1 | C1 | topics |
|
|
|
15 |
And the following "groups" exist:
|
|
|
16 |
| name | course | idnumber |
|
|
|
17 |
| Group 1 | C1 | G1 |
|
|
|
18 |
| Group 2 | C1 | G2 |
|
|
|
19 |
| Group 3 | C1 | G3 |
|
|
|
20 |
And the following "course enrolments" exist:
|
|
|
21 |
| user | course | role |
|
|
|
22 |
| teacher1 | C1 | editingteacher |
|
|
|
23 |
| student1 | C1 | editingteacher |
|
|
|
24 |
|
|
|
25 |
@javascript @skip_chrome_zerosize
|
|
|
26 |
Scenario: Adding a user to multiple groups
|
|
|
27 |
Given I log in as "teacher1"
|
|
|
28 |
And I am on "Course 1" course homepage
|
|
|
29 |
And I follow "Participants"
|
|
|
30 |
And I click on "Edit groups for \"Student 1\"" "link" in the "student1" "table_row"
|
|
|
31 |
And I open the autocomplete suggestions list in the "student1" "table_row"
|
|
|
32 |
And I click on "Group 1" item in the autocomplete list
|
|
|
33 |
And I click on "Group 2" item in the autocomplete list
|
|
|
34 |
And I press the escape key
|
|
|
35 |
And I click on "Save changes" "link" in the "student1" "table_row"
|
|
|
36 |
Then I should see "Group 1, Group 2"
|