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