MDL-49960 message: Adding behat test for recent conversations

This commit is contained in:
Frederic Massart 2015-04-23 14:05:55 +08:00
parent d9b5f9bb6c
commit c8b4b67a2f

View File

@ -0,0 +1,36 @@
@core @core_message @javascript
Feature: Recent conversations contains my recent conversations
In order to view my recent conversations
As a user
I have the option to filter messages by recent conversations
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | One | one@example.com |
| user2 | User | Two | two@example.com |
| user3 | User | Three | three@example.com |
Scenario: View that I don't have recent conversations
Given I log in as "user1"
And I follow "Messages" in the user menu
When I set the field "Message navigation:" to "Recent conversations"
Then I should not see "User Two"
And I should not see "User Three"
Scenario: View my recent conversations
Given I log in as "user1"
And I send "Message from user1 to user2" message to "User Two" user
And I send "Message from user1 to user3" message to "User Three" user
And I follow "Messages" in the user menu
When I set the field "Message navigation:" to "Recent conversations"
Then I should see "User Two"
And I should see "User Three"
And I should see "Message from user1 to user2"
And I should see "Message from user1 to user3"
And I log out
And I log in as "user2"
And I follow "Messages" in the user menu
And I set the field "Message navigation:" to "Recent conversations"
And I should see "Message from user1 to user2"
And I should not see "Message from user1 to user3"