Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Ross <ragesoss@gmail.com>2021-12-31 00:50:06 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2022-06-19 20:29:57 +0300
commitef7a5f8d6ecd861bac4f58fee9e00edb6c903541 (patch)
tree2c6729dc4465bd657702371ce23a936bfd771f69 /features
parent688245c0de784efbb60c61f83a037728a06c5f03 (diff)
Replace "execute_script" for triggering hovercards
In addition to getting rid of an "execute_script" instance, this approach is slightly higher fidelity, as it renders the hovercard at the correct place on the page and doesn't reach into jQuery to trigger the hovercard.
Diffstat (limited to 'features')
-rw-r--r--features/step_definitions/hovercard_steps.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/features/step_definitions/hovercard_steps.rb b/features/step_definitions/hovercard_steps.rb
index 832dcc307..3235d43e8 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
- page.execute_script("$('.hovercardable').first().trigger('mouseenter');")
+ first(".hovercardable").hover
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
- page.execute_script("$('.hovercardable').first().trigger('mouseleave');")
+ find("input#q").click # Click something else instead — e.g., search — to deactive it
end
Then(/^I should not see a hovercard$/) do