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
730 B
Ruby
21 lines
730 B
Ruby
class SpecialPreferencesPage
|
|
include PageObject
|
|
page_url 'Special:Preferences'
|
|
|
|
a(:beta_features_tab, css: '#preftab-betafeatures')
|
|
text_field(:page_previews_checkbox, css: '[name=wppopups]')
|
|
button(:submit_button, css: '#prefcontrol')
|
|
div(:notification, css: ".mw-notification")
|
|
|
|
def enable_page_previews
|
|
beta_features_tab_element.when_present.click
|
|
return unless page_previews_checkbox_element.attribute('checked').nil?
|
|
page_previews_checkbox_element.click
|
|
submit_button_element.when_present.click
|
|
|
|
# Note well that Element#wait_until_present is more semantic but is
|
|
# deprecated. Fortunately, #when_present simply wraps #wait_until_present.
|
|
notification_element.when_present
|
|
end
|
|
end
|