[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

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