[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/messages/tests/behat/ -> block_messages_dashboard.feature (source)

   1  @block @block_messages
   2  Feature: The messages block allows users to list new messages on the dashboard
   3    In order to enable the messages block on the dashboard
   4    As a user
   5    I can add the messages block to a my dashboard 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  
  13    Scenario: View the block by a user with messaging disabled.
  14      Given the following config values are set as admin:
  15        | messaging       | 0 |
  16      And I log in as "teacher1"
  17      And I press "Customise this page"
  18      When I add the "Messages" block
  19      Then I should see "Messaging is disabled on this site" in the "Messages" "block"
  20  
  21    Scenario: View the block by a user who does not have any messages.
  22      Given I log in as "teacher1"
  23      And I press "Customise this page"
  24      When I add the "Messages" block
  25      Then I should see "No messages waiting" in the "Messages" "block"
  26  
  27    Scenario: View the block by a user who has messages.
  28      Given I log in as "student1"
  29      And I follow "Messages" in the user menu
  30      And I send "This is message 1" message to "Teacher 1" user
  31      And I send "This is message 2" message to "Teacher 1" user
  32      And I log out
  33      When I log in as "teacher1"
  34      And I press "Customise this page"
  35      And I add the "Messages" block
  36      Then I should see "Student 1" in the "Messages" "block"
  37  
  38    Scenario: Use the block to send a message to a user.
  39      Given I log in as "teacher1"
  40      And I press "Customise this page"
  41      And I add the "Messages" block
  42      And I follow "Messages"
  43      And I send "This is message 1" message to "Student 1" user
  44      And I log out
  45      When I log in as "student1"
  46      And I press "Customise this page"
  47      And I add the "Messages" block
  48      Then I should see "Teacher 1" in the "Messages" "block"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1