1 @core @core_user @javascript
3 In order to communicate with my students
5 I need to be able to send a message to all my students
8 Given the following "courses" exist:
9 | fullname | shortname | category | groupmode |
10 | Course 1 | C1 | 0 | 1 |
11 And the following "users" exist:
12 | username | firstname | lastname | email |
13 | teacher1 | Teacher | 1 | teacher@example.com |
14 | student1 | Student | 1 | student1@example.com |
15 | student2 | Student | 2 | student2@example.com |
16 And the following "course enrolments" exist:
17 | user | course | role |
18 | teacher1 | C1 | editingteacher |
19 | student1 | C1 | student |
20 | student2 | C1 | student |
22 Scenario: Send a message to students from participants list
23 Given I log in as "teacher1"
24 And I am on "Course 1" course homepage
25 And I navigate to course participants
26 And I click on "Select all" "checkbox"
27 And I set the field "With selected users..." to "Send a message"
28 And "Send message to 3 people" "dialogue" should exist
29 # Try to send an empty message.
30 When I press "Send message to 3 people"
31 Then I should see "Please enter message text"
32 And I set the following fields to these values:
33 | bulk-message | "Hello world!" |
34 And I press "Send message to 3 people"
35 And I should see "Message sent to 3 people"