MDL-41369 Behat tests updated because of fixed messaging navigation
[moodle.git] / message / tests / behat / manage_contacts.feature
CommitLineData
550d842e 1@core @core_message
1c1c2866
DM
2Feature: Manage contacts
3 In order to easily access the users I interact more with
5d7b6307 4 As a user
1c1c2866
DM
5 I need to add and remove users to/from my contacts list
6
7 Background:
8 Given the following "users" exists:
9 | username | firstname | lastname | email |
10 | user1 | User | One | one@asd.com |
11 | user2 | User | Two | two@asd.com |
12 And I log in as "user1"
13 And I send "Message 1 from user1 to user2" message to "user2"
14 And I send "Message 2 from user1 to user2" message to "user2"
1b405648
MG
15 And I expand "My profile" node
16 And I click on "Messages" "link" in the "Navigation" "block"
1c1c2866
DM
17 And I fill in "Search people and messages" with "User Two"
18 And I press "Search people and messages"
19 When I click on "Add contact" "link" in the "User Two" table row
20 Then I should see "Message 1 from user1 to user2"
21 And I should see "Message 2 from user1 to user2"
22 And I should see "User Two" in the "#message_contacts" "css_element"
23 And I follow "Remove contact"
24 And I should not see "User Two" in the "#message_contacts" "css_element"
25 And I should not see "Remove contact"
26 And I should see "Add contact"
27 And I follow "Add contact"
28 And I should see "User Two" in the "#message_contacts" "css_element"
29
30 @javascript
31 Scenario: Adding and removing contacts with Javascript enabled
32
33 Scenario: Adding and removing contacts with Javascript disabled