mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-13 15:58:27 +00:00
d7caa6c1f3
This adds 1 simple browser test to make sure that the placeholder for the revision slider loads when the beta feature is enabled and does not load when it is disabled More tests will follow. Bug: T133278 Change-Id: I5be9014b6c5ac03128c034fd866141e89fd7a0ed
22 lines
752 B
Ruby
22 lines
752 B
Ruby
class SpecialPreferencesPage
|
|
include PageObject
|
|
page_url 'Special:Preferences'
|
|
|
|
a(:beta_features_tab, css: '#preftab-betafeatures')
|
|
text_field(:revisionslider_checkbox, css: '#mw-input-wprevisionslider')
|
|
button(:submit_button, css: '#prefcontrol')
|
|
|
|
def enable_revisionslider
|
|
beta_features_tab_element.when_present.click
|
|
return unless revisionslider_checkbox_element.attribute('checked').nil?
|
|
revisionslider_checkbox_element.click
|
|
submit_button_element.when_present.click
|
|
end
|
|
|
|
def disable_revisionslider
|
|
beta_features_tab_element.when_present.click
|
|
return if revisionslider_checkbox_element.attribute('checked').nil?
|
|
revisionslider_checkbox_element.click
|
|
submit_button_element.when_present.click
|
|
end
|
|
end |