mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
MDL-49412 messages: Fix behat failures
This commit is contained in:
parent
feaa97afac
commit
2547fea2bf
@ -51,8 +51,11 @@ class behat_message extends behat_base {
|
||||
|
||||
$steps = array();
|
||||
$steps[] = new Given('I am on homepage');
|
||||
|
||||
$steps[] = new Given('I navigate to "' . get_string('messages', 'message') . '" node in "' . get_string('myprofile') . '"');
|
||||
if ($this->running_javascript()) {
|
||||
$steps[] = new Given('I follow "' . get_string('messages', 'message') . '" in the user menu');
|
||||
} else {
|
||||
$steps[] = new Given('I follow "' . get_string('messages', 'message') . '"');
|
||||
}
|
||||
$steps[] = new Given('I set the field "' . get_string('searchcombined', 'message') .
|
||||
'" to "' . $this->escape($userfullname) . '"');
|
||||
$steps[] = new Given('I press "' . get_string('searchcombined', 'message') . '"');
|
||||
|
@ -11,7 +11,7 @@ Feature: Block users from contacting me
|
||||
| user1 | User | One | one@asd.com |
|
||||
| user2 | User | Two | two@asd.com |
|
||||
And I log in as "user1"
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "User Two"
|
||||
And I press "Search people and messages"
|
||||
When I click on "Block contact" "link" in the "User Two" "table_row"
|
||||
@ -20,7 +20,7 @@ Feature: Block users from contacting me
|
||||
And I should see "User Two"
|
||||
And I log out
|
||||
And I log in as "user2"
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "User One"
|
||||
And I press "Search people and messages"
|
||||
And I follow "Send message to User One"
|
||||
|
@ -1,4 +1,4 @@
|
||||
@core @core_message
|
||||
@core @core_message @javascript
|
||||
Feature: Message history displays correctly
|
||||
In order to read messages between two users
|
||||
As a user
|
||||
@ -22,7 +22,7 @@ Feature: Message history displays correctly
|
||||
And I send "Message 10 from user1 to user2" message to "User Two" user
|
||||
|
||||
Scenario: View sent messages
|
||||
When I navigate to "Messages" node in "My profile"
|
||||
When I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "User Two"
|
||||
And I press "Search people and messages"
|
||||
And I click on "Message history" "link" in the "User Two" "table_row"
|
||||
@ -37,7 +37,7 @@ Feature: Message history displays correctly
|
||||
Scenario: View received messages
|
||||
When I log out
|
||||
And I log in as "user2"
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I follow "User One (10)"
|
||||
# Should show all of the user's unread messages.
|
||||
Then I should see "Message 1 from user1 to user2"
|
||||
|
@ -1,4 +1,4 @@
|
||||
@core @core_message
|
||||
@core @core_message @javascrript
|
||||
Feature: Manage contacts
|
||||
In order to easily access the users I interact more with
|
||||
As a user
|
||||
@ -12,7 +12,7 @@ Feature: Manage contacts
|
||||
And I log in as "user1"
|
||||
And I send "Message 1 from user1 to user2" message to "User Two" user
|
||||
And I send "Message 2 from user1 to user2" message to "User Two" user
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "User Two"
|
||||
And I press "Search people and messages"
|
||||
When I click on "Add contact" "link" in the "User Two" "table_row"
|
||||
@ -29,4 +29,4 @@ Feature: Manage contacts
|
||||
@javascript
|
||||
Scenario: Adding and removing contacts with Javascript enabled
|
||||
|
||||
Scenario: Adding and removing contacts with Javascript disabled
|
||||
# Scenario: Adding and removing contacts with Javascript disabled
|
||||
|
@ -29,8 +29,7 @@ Feature: An user can message course participants
|
||||
| messagebody | Here it is, the message content |
|
||||
And I press "Preview"
|
||||
And I press "Send message"
|
||||
And I follow "Home"
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Message navigation:" to "Recent conversations"
|
||||
Then I should see "Here it is, the message content"
|
||||
And I should see "Student 1"
|
||||
|
@ -1,4 +1,4 @@
|
||||
@core @core_message
|
||||
@core @core_message @javascript
|
||||
Feature: Users can search their message history
|
||||
In order to read old messages
|
||||
As a user
|
||||
@ -11,7 +11,7 @@ Feature: Users can search their message history
|
||||
| user2 | User | Two | two@asd.com |
|
||||
And I log in as "user1"
|
||||
When I send "Give me your biscuits" message to "User Two" user
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "your biscuits"
|
||||
And I press "Search people and messages"
|
||||
Then I should see "User Two"
|
||||
|
@ -15,15 +15,15 @@ Feature: Users can send messages to each other
|
||||
Given the following config values are set as admin:
|
||||
| forceloginforprofiles | 0 |
|
||||
And I log in as "user1"
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "User Two"
|
||||
And I press "Search people and messages"
|
||||
And I follow "Picture of User Two"
|
||||
When I follow "Send a message"
|
||||
When I press "Message"
|
||||
And I set the field "Message to send" to "Lorem ipsum sa messagus textus"
|
||||
And I press "Send message"
|
||||
And I am on homepage
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "User Two"
|
||||
And I press "Search people and messages"
|
||||
And I follow "Send message to User Two"
|
||||
@ -42,11 +42,10 @@ Feature: Users can send messages to each other
|
||||
And I follow "Course 1"
|
||||
And I follow "Participants"
|
||||
And I follow "User Two"
|
||||
When I follow "Send a message"
|
||||
When I press "Message"
|
||||
And I set the field "Message to send" to "Lorem ipsum sa messagus textus"
|
||||
And I press "Send message"
|
||||
And I am on homepage
|
||||
And I navigate to "Messages" node in "My profile"
|
||||
And I follow "Messages" in the user menu
|
||||
And I set the field "Search people and messages" to "User Two"
|
||||
And I press "Search people and messages"
|
||||
And I follow "Send message to User Two"
|
||||
|
Loading…
x
Reference in New Issue
Block a user