HEX
Server: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: iestorre (46869)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/iestorre/moodleAW/moodle06/message/tests/behat/block_users.feature
@core @core_message
Feature: Block users from contacting me
  In order to block other users
  As a user
  I need to prevent specific users to sending me messages

  @javascript
  Scenario: Block users from contacting me with Javascript enabled
    Given the following "users" exists:
      | username | firstname | lastname | email |
      | user1 | User | One | one@asd.com |
      | user2 | User | Two | two@asd.com |
    And I log in as "user1"
    And I expand "My profile" node
    And I follow "Messages"
    And I fill in "Search people and messages" with "User Two"
    And I press "Search people and messages"
    When I click on "Block contact" "link" in the "User Two" "table_row"
    Then the "Message navigation:" select box should contain "Blocked users (1)"
    And I select "Blocked users (1)" from "Message navigation:"
    And I should see "User Two"
    And I log out
    And I log in as "user2"
    And I expand "My profile" node
    And I follow "Messages"
    And I fill in "Search people and messages" with "User One"
    And I press "Search people and messages"
    And I follow "Send message to User One"
    And I should see "This user has blocked you from sending messages to them"