[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/message/tests/behat/ -> block_users.feature (source)

   1  @core @core_message
   2  Feature: Block users from contacting me
   3    In order to block other users
   4    As a user
   5    I need to prevent specific users to sending me messages
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | user1 | User | One | one@example.com |
  11        | user2 | User | Two | two@example.com |
  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        | user1 | C1 | student |
  18        | user2 | C1 | student |
  19      And I log in as "user1"
  20      And I follow "Messages" in the user menu
  21      And I set the field "Search people and messages" to "User Two"
  22      And I press "Search people and messages"
  23      And I click on "Block contact" "link" in the "User Two" "table_row"
  24      And I log out
  25  
  26    @javascript
  27    Scenario: Block users display in message navigation
  28      Given I log in as "user1"
  29      When I follow "Messages" in the user menu
  30      Then the "Message navigation:" select box should contain "Blocked users (1)"
  31      And I set the field "Message navigation:" to "Blocked users (1)"
  32      And I should see "User Two"
  33  
  34    @javascript
  35    Scenario: Block users from contacting me
  36      Given I log in as "user2"
  37      And I follow "Messages" in the user menu
  38      And I set the field "Search people and messages" to "User One"
  39      And I press "Search people and messages"
  40      When I follow "Send message to User One"
  41      Then I should see "This user has blocked you from sending messages to them"
  42      And I follow "Picture of User One"
  43      And I press "Message"
  44      And I should see "This user has blocked you from sending messages to them"


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