mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-18 12:55:51 +00:00
cd0546beb8
The Hovercards checkbox on the beta preferences page doesn't have an ID anymore. It has a name though, which is used from now on. The regression was introduced in I8636f32330e23814ba3b4c0f5e22e55aaf77883e. Bug: T148856 Change-Id: I7baa78b0d8c560ee29c3a550628bfd47cad1c30e
21 lines
718 B
Ruby
21 lines
718 B
Ruby
class SpecialPreferencesPage
|
|
include PageObject
|
|
page_url 'Special:Preferences'
|
|
|
|
a(:beta_features_tab, css: '#preftab-betafeatures')
|
|
text_field(:hovercards_checkbox, css: '[name=wppopups]')
|
|
button(:submit_button, css: '#prefcontrol')
|
|
div(:notification, css: ".mw-notification")
|
|
|
|
def enable_hovercards
|
|
beta_features_tab_element.when_present.click
|
|
return unless hovercards_checkbox_element.attribute('checked').nil?
|
|
hovercards_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
|