diff --git a/message/tests/behat/message_participants.feature b/message/tests/behat/message_participants.feature index b15a393e3277e..849e57b6e62ea 100644 --- a/message/tests/behat/message_participants.feature +++ b/message/tests/behat/message_participants.feature @@ -4,7 +4,6 @@ Feature: An user can message course participants As a teacher I need to message them all - @javascript Scenario: An user can message multiple course participants including him/her self Given the following "users" exist: | username | firstname | lastname | email | @@ -22,15 +21,16 @@ Feature: An user can message course participants And I log in as "teacher1" And I follow "Course 1" And I follow "Participants" - When I click on "input[type='checkbox']" "css_element" in the "Teacher 1" "table_row" - And I click on "input[type='checkbox']" "css_element" in the "Student 1" "table_row" + When I set the field with xpath "//tr[contains(normalize-space(.), 'Teacher 1')]//input[@type='checkbox']" to "1" + And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 1')]//input[@type='checkbox']" to "1" And I set the field "With selected users..." to "Send a message" + And I press "OK" And I set the following fields to these values: | messagebody | Here it is, the message content | And I press "Preview" And I press "Send message" And I follow "Messages" in the user menu - And I set the field "Message navigation:" to "Recent conversations" + And I select "Recent conversations" from the "Message navigation:" singleselect Then I should see "Here it is, the message content" And I should see "Student 1" And I click on "this conversation" "link" in the "//div[@class='singlemessage'][contains(., 'Teacher 1')]" "xpath_element"