[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @block @block_messages 2 Feature: The messages block allows users to list new messages an a course 3 In order to enable the messages block in a course 4 As a teacher 5 I can add the messages block to a course and view my messages 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | idnumber | 10 | teacher1 | Teacher | 1 | teacher1@example.com | T1 | 11 | student1 | Student | 1 | student1@example.com | S1 | 12 And the following "courses" exist: 13 | fullname | shortname | category | 14 | Course 1 | C1 | 0 | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 | student1 | C1 | student | 19 20 Scenario: View the block by a user with messaging disabled. 21 Given the following config values are set as admin: 22 | messaging | 0 | 23 And I log in as "teacher1" 24 And I follow "Course 1" 25 When I turn editing mode on 26 And I add the "Messages" block 27 Then I should see "Messaging is disabled on this site" in the "Messages" "block" 28 29 Scenario: View the block by a user who does not have any messages. 30 Given I log in as "teacher1" 31 And I follow "Course 1" 32 When I turn editing mode on 33 And I add the "Messages" block 34 Then I should see "No messages waiting" in the "Messages" "block" 35 36 Scenario: View the block by a user who has messages. 37 Given I log in as "student1" 38 And I follow "Messages" in the user menu 39 And I send "This is message 1" message to "Teacher 1" user 40 And I send "This is message 2" message to "Teacher 1" user 41 And I log out 42 And I log in as "teacher1" 43 And I follow "Course 1" 44 When I turn editing mode on 45 And I add the "Messages" block 46 Then I should see "Student 1" in the "Messages" "block" 47 48 Scenario: Use the block to send a message to a user. 49 Given I log in as "teacher1" 50 And I follow "Course 1" 51 And I turn editing mode on 52 And I add the "Messages" block 53 And I follow "Messages" 54 And I send "This is message 1" message to "Student 1" user 55 And I log out 56 When I log in as "student1" 57 And I follow "Course 1" 58 Then I should see "Teacher 1" in the "Messages" "block"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |