Commit | Line | Data |
---|---|---|
f3ecea3a | 1 | @core_enrol @core_group |
31635bfb AN |
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 | | |
0fe86bbd RT |
10 | | teacher1 | Teacher | 1 | teacher1@example.com | |
11 | | student1 | Student | 1 | student1@example.com | | |
31635bfb AN |
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 | ||
76c493b3 | 25 | @javascript |
31635bfb AN |
26 | Scenario: Adding a user to one group |
27 | Given I log in as "teacher1" | |
fdeeaff9 | 28 | And I am on "Course 1" course homepage |
76c493b3 DW |
29 | And I follow "Participants" |
30 | And I click on "Edit groups for \"Student 1\"" "link" in the "student1" "table_row" | |
dda64b6f DW |
31 | And I open the autocomplete suggestions list |
32 | And I click on "Group 1" item in the autocomplete list | |
33 | And I open the autocomplete suggestions list | |
34 | And I click on "Group 2" item in the autocomplete list | |
91b099db JP |
35 | And I press key "27" in the field "Edit groups for \"Student 1\"" |
36 | And I click on "Save changes" "link" in the "student1" "table_row" | |
76c493b3 | 37 | Then I should see "Group 1, Group 2" |
31635bfb | 38 | |
76c493b3 | 39 | @javascript |
31635bfb AN |
40 | Scenario: Adding a user to multiple group |
41 | Given I log in as "teacher1" | |
fdeeaff9 | 42 | And I am on "Course 1" course homepage |
31635bfb AN |
43 | And I navigate to "Enrolled users" node in "Course administration > Users" |
44 | And I click on "Add user into group" "link" in the "student1" "table_row" | |
45 | When I set the field "Add user into group" to "Group 1, Group 2, Group 3" | |
46 | And I press "Save changes" | |
47 | Then I should see "Group 1" | |
48 | And I should see "Group 2" | |
49 | And I should see "Group 3" |