mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-18 12:55:51 +00:00
21 lines
507 B
Ruby
21 lines
507 B
Ruby
|
When(/^I dwell on the first valid link$/) do
|
||
|
on(ArticlePage).first_valid_link_element.hover
|
||
|
end
|
||
|
|
||
|
When(/^I abandon the link$/) do
|
||
|
on(ArticlePage).page_header_element.hover
|
||
|
end
|
||
|
|
||
|
Then(/^I should see a preview$/) do
|
||
|
expect(on(ArticlePage).hovercard_element.when_present(5)).to be_visible
|
||
|
end
|
||
|
|
||
|
Then(/^I should not see a preview$/) do
|
||
|
|
||
|
# Requesting a preview hits the API so wait some time before asserting it did
|
||
|
# not show.
|
||
|
sleep 5
|
||
|
|
||
|
expect(on(ArticlePage).hovercard_element).not_to be_visible
|
||
|
end
|