use #hover instead of execute_script hacks

This commit is contained in:
Fabian Rodriguez 2013-08-21 21:14:03 -03:00
parent d489dfc8e3
commit cdfdf37a17
3 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name|
within(".all_aspects") do
li = find('li', text: aspect_name)
page.execute_script("$('#aspects_list li:contains(\\'#{aspect_name}\\') .modify_aspect').css('display', 'block');") # TODO HACK please replace me by li.hover when capybara will be fixed
li.hover
li.find('.modify_aspect').click
end
end

View file

@ -41,6 +41,7 @@ Then /^I should see "([^"]*)" as part of the participants popover$/ do |name|
end
Then /^I close the participants popover$/ do
find('.popover-title .close', visible: false).click
find('.popover').hover
find('.popover-title .close').click
end

View file

@ -114,7 +114,7 @@ And /^I want to mention (?:him|her) from the profile$/ do
end
And /^I hover over the "([^"]+)"$/ do |element|
page.execute_script("$(\"#{element}\").first().addClass('hover')")
find("#{element}", match: :first).hover
end
When /^I prepare the deletion of the first post$/ do