Use explicit classes in the hover step definition
This commit is contained in:
parent
47e0558c3e
commit
06abdce180
4 changed files with 6 additions and 10 deletions
|
|
@ -46,7 +46,7 @@ Feature: commenting
|
|||
And I fill in "Comment" with "is that a poodle?"
|
||||
And I press "Comment"
|
||||
And I wait for the ajax to finish
|
||||
When I hover over the comment
|
||||
When I hover over the ".comment.posted"
|
||||
And I preemptively confirm the alert
|
||||
And I click to delete the first comment
|
||||
And I wait for the ajax to finish
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ Feature: posting
|
|||
Then I should see "I am da #boss"
|
||||
|
||||
Scenario: can stop following a particular tag
|
||||
When I hover over the ".button.tag_following"
|
||||
When I press "Stop Following #boss"
|
||||
|
||||
And I go to the home page
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ Feature: posting
|
|||
And I sign in as "alice@alice.alice"
|
||||
And I am on "bob@bob.bob"'s page
|
||||
|
||||
And I hover over the post
|
||||
And I hover over the ".stream_element"
|
||||
And I click to delete the first post
|
||||
And I wait for the ajax to finish
|
||||
And I go to "bob@bob.bob"'s page
|
||||
|
|
@ -77,7 +77,7 @@ Feature: posting
|
|||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "Your Aspects"
|
||||
And I hover over the post
|
||||
And I hover over the ".stream_element"
|
||||
And I preemptively confirm the alert
|
||||
And I click to delete the first post
|
||||
And I wait for the ajax to finish
|
||||
|
|
|
|||
|
|
@ -36,13 +36,8 @@ When /^I append "([^"]*)" to the publisher$/ do |stuff|
|
|||
end
|
||||
end
|
||||
|
||||
And /^I hover over the (\w*)$/ do |element|
|
||||
if element == 'post'
|
||||
name = 'stream_element'
|
||||
elsif element == 'comment'
|
||||
name = 'comment.posted'
|
||||
end
|
||||
page.execute_script("$(\".#{name}\").first().mouseover()")
|
||||
And /^I hover over the "([^"]+)"$/ do |element|
|
||||
page.execute_script("$(\"#{element}\").first().mouseover()")
|
||||
end
|
||||
|
||||
When /^I click to delete the first post$/ do
|
||||
|
|
|
|||
Loading…
Reference in a new issue