From ae5333d67dc32e388393fb6e6382336c7ea8a53c Mon Sep 17 00:00:00 2001 From: Sage Ross Date: Thu, 6 Jan 2022 06:06:27 -0800 Subject: [PATCH] Revert "Replace "execute_script" for triggering hovercards" This reverts commit e7dc4eca9ecdb025c01b02890e8e075ebc1af9cc. --- features/step_definitions/hovercard_steps.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/step_definitions/hovercard_steps.rb b/features/step_definitions/hovercard_steps.rb index 2fa367b3f..832dcc307 100644 --- a/features/step_definitions/hovercard_steps.rb +++ b/features/step_definitions/hovercard_steps.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true When(/^I activate the first hovercard$/) do - first(".hovercardable").hover + page.execute_script("$('.hovercardable').first().trigger('mouseenter');") end Then(/^I should see a hovercard$/) do @@ -14,7 +14,7 @@ Then(/^I should see "([^"]*)" hashtag in the hovercard$/) do |tag| end When(/^I deactivate the first hovercard$/) do - find("input#q").click # Click something else instead to deactive it + page.execute_script("$('.hovercardable').first().trigger('mouseleave');") end Then(/^I should not see a hovercard$/) do