Skip to content

Commit

Permalink
MDL-52949 behat: Use hover step and not click step
Browse files Browse the repository at this point in the history
Message delete link is visible on hover
Click event can fail randomly.
  • Loading branch information
Rajesh Taneja committed Feb 1, 2016
1 parent c9d91bb commit ead6c29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions message/tests/behat/delete_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Feature: Check that messages can be deleted
And "Delete" "link" should exist in the "#message_1" "css_element"
And "Delete" "link" should exist in the "#message_2" "css_element"
# Confirm that there is a confirmation box before deleting, and that when we cancel the messages remain.
And I click on "#message_2" "css_element"
And I hover "#message_2" "css_element"
And I click on "Delete" "link" in the "#message_2" "css_element"
And I press "Cancel"
And I should see "Hey bud, what's happening?"
And I should see "Whoops, forgot to mention that I drank all your beers. Lol."
# Confirm we can delete a message and then can no longer see it.
And I click on "#message_2" "css_element"
And I hover "#message_2" "css_element"
And I click on "Delete" "link" in the "#message_2" "css_element"
And I press "Delete"
And I should see "Hey bud, what's happening?"
Expand Down Expand Up @@ -69,10 +69,10 @@ Feature: Check that messages can be deleted
And "Delete" "link" should exist in the "#message_3" "css_element"
And "Delete" "link" should exist in the "#message_4" "css_element"
# Now, delete one of the messages that User 1 sent and one by User 2.
And I click on "#message_1" "css_element"
And I hover "#message_1" "css_element"
And I click on "Delete" "link" in the "#message_1" "css_element"
And I press "Delete"
And I click on "#message_2" "css_element"
And I hover "#message_2" "css_element"
And I click on "Delete" "link" in the "#message_2" "css_element"
And I press "Delete"
# Confirm that the messages are no longer listed.
Expand Down Expand Up @@ -111,7 +111,7 @@ Feature: Check that messages can be deleted
# Send a message from the admin to User 1
And I send "Hey there, this is the all-powerful administrator. Obey my commands." message to "User 1" user
# Check the admin is still able to delete messages.
And I click on "#message_1" "css_element"
And I hover "#message_1" "css_element"
And I click on "Delete" "link" in the "#message_1" "css_element"
And I press "Delete"
And I should not see "Hey there, this is the all-powerful administrator. Obey my commands."
Expand Down

0 comments on commit ead6c29

Please sign in to comment.