mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
MDL-49960 message: Adding behat test for recent conversations
This commit is contained in:
parent
d9b5f9bb6c
commit
c8b4b67a2f
36
message/tests/behat/recent_conversations.feature
Normal file
36
message/tests/behat/recent_conversations.feature
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user