mediawiki-extensions-Relate.../tests/browser/features/support/pages/special_preferences_page.rb
Antoine Musso d8b773f9a4 Rake entry point and rubocop fix up
Introduce the rake test entry point which is invoked by CI.

Add a basic rubocop configuration based on
https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby

Fix up a few ruby issues.

Bug: T120715
Change-Id: I3df0a3b13155259ec6cb5010e7aaa3bf9aa7b230
2016-01-06 16:57:22 +01:00

17 lines
496 B
Ruby

class SpecialPreferencesPage
include PageObject
page_url 'Special:Preferences'
a(:beta_features_tab, css: '#preftab-betafeatures')
text_field(:read_more_checkbox, css: '#mw-input-wpread-more')
button(:submit_button, css: '#prefcontrol')
def enable_read_more
beta_features_tab_element.when_present.click
if read_more_checkbox_element.attribute('checked').nil?
read_more_checkbox_element.when_present.click
end
submit_button_element.when_present.click
end
end