1 |
efrain |
1 |
@core @core_group
|
|
|
2 |
Feature: Bulk update group messaging status
|
|
|
3 |
In order to update group messaging settings in bulk
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to select the groups and update their messaging settings using the buttons provided.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format |
|
|
|
10 |
| Course 1 | C1 | topics |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "groups" exist:
|
|
|
18 |
| course | name | idnumber |
|
|
|
19 |
| C1 | Group-A-Test | GA |
|
|
|
20 |
| C1 | Group-B-Test | GB |
|
|
|
21 |
And I am on the "Course 1" "groups" page logged in as "teacher1"
|
|
|
22 |
|
|
|
23 |
@javascript
|
|
|
24 |
Scenario: Bulk enable messaging in groups
|
|
|
25 |
Given I set the field "groups" to "Group-A-Test (0)"
|
|
|
26 |
And I press "Edit group settings"
|
|
|
27 |
And I set the field "id_enablemessaging" to "0"
|
|
|
28 |
And I press "Save changes"
|
|
|
29 |
And I wait until the page is ready
|
|
|
30 |
And the field "groups" matches value "Group-A-Test (0)"
|
|
|
31 |
And I press "Enable messaging"
|
|
|
32 |
And I wait until the page is ready
|
|
|
33 |
And I should see "Successfully enabled messaging in 1 group(s)"
|
|
|
34 |
And I set the field "groups" to "Group-A-Test (0)"
|
|
|
35 |
And I press "Edit group settings"
|
|
|
36 |
Then the field "id_enablemessaging" matches value "1"
|
|
|
37 |
|
|
|
38 |
@javascript
|
|
|
39 |
Scenario: Bulk disable messaging in groups
|
|
|
40 |
Given I set the field "groups" to "Group-A-Test (0)"
|
|
|
41 |
And I press "Edit group settings"
|
|
|
42 |
And I set the field "id_enablemessaging" to "1"
|
|
|
43 |
And I press "Save changes"
|
|
|
44 |
And I wait until the page is ready
|
|
|
45 |
And the field "groups" matches value "Group-A-Test (0)"
|
|
|
46 |
And I press "Disable messaging"
|
|
|
47 |
And I wait until the page is ready
|
|
|
48 |
And I should see "Successfully disabled messaging in 1 group(s)"
|
|
|
49 |
And I set the field "groups" to "Group-A-Test (0)"
|
|
|
50 |
And I press "Edit group settings"
|
|
|
51 |
Then the field "id_enablemessaging" matches value "0"
|
|
|
52 |
|
|
|
53 |
@javascript
|
|
|
54 |
Scenario: Messaging buttons are enabled when a group is selected
|
|
|
55 |
Given I set the field "groups" to "Group-A-Test (0)"
|
|
|
56 |
Then the field "groups" matches value "Group-A-Test (0)"
|
|
|
57 |
And the "Enable messaging" "button" should be enabled
|
|
|
58 |
And the "Disable messaging" "button" should be enabled
|