mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-19 02:30:45 +00:00
4db0043ee7
Changes: * Rename the somewhat awkwardly named "popups_core" Cucumber feature and its accompanying step definitions to "previews". * Remove as many references to Popups and HoverCards as possible. * Use language consistent with the QUnit unit and integration tests and documentation, e.g. the user dwells on a link. * Remove settings-related step definitions from the previews step definitions. Change-Id: Ibc0d07e8394aeb640f9efaabfe10be5317bf4b8c
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
|