diaspora/features/step_definitions/hovercard_steps.rb
Jonne Haß 5026eccc6a Refactor and reorder backbone app initialization, fixes hovercards
Also added cucumber feature for hovercards
2013-08-01 12:52:16 +02:00

15 lines
417 B
Ruby

When(/^I activate the first hovercard$/) do
page.execute_script("$('.hovercardable').first().trigger('mouseenter');")
end
Then(/^I should see a hovercard$/) do
page.should have_css '#hovercard'
end
When(/^I deactivate the first hovercard$/) do
page.execute_script("$('.hovercardable').first().trigger('mouseleave');")
end
Then(/^I should not see a hovercard$/) do
page.should_not have_css '#hovercard'
end