Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/60671
Change subject: do not set the radio buttons just check that they exist ...................................................................... do not set the radio buttons just check that they exist Change-Id: I336b51c95c71f3c9319e8034edf51b3c165a8403 --- A features/preferences_appearance.feature A features/step_definitions/preferences_appearance_steps.rb A features/support/pages/appearance_page.rb A features/support/pages/preferences_page.rb 4 files changed, 152 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/71/60671/1 diff --git a/features/preferences_appearance.feature b/features/preferences_appearance.feature new file mode 100644 index 0000000..419622c --- /dev/null +++ b/features/preferences_appearance.feature @@ -0,0 +1,20 @@ +@login +Feature: Preferences + + Background: + Given I am logged in + When I navigate to Preferences + + Scenario: Appearance + When I click Appearance + Then I can select skins + And I have a link to Custom CSS + And I have a link to Custom Javascript + And I can select image size + And I can select thumbnail size + And I can select Threshold for stub link + And I can select underline preferences + And I have advanced options checkboxes + And I have Math options radio buttons + And I can click Save + And I can restore default settings diff --git a/features/step_definitions/preferences_appearance_steps.rb b/features/step_definitions/preferences_appearance_steps.rb new file mode 100644 index 0000000..1e29460 --- /dev/null +++ b/features/step_definitions/preferences_appearance_steps.rb @@ -0,0 +1,70 @@ +When(/^I navigate to Preferences$/) do + visit(PreferencesPage) +end + +When(/^I click Appearance$/) do + visit(PreferencesPage).appearance_link +end + +Then(/^I can select skins$/) do + on(AppearancePage) do |page| + page.cologne_blue_element.should exist + page.modern_element.should exist + page.monobook_element.should exist + page.vector_element.should exist + end +end + +Then(/^I have a link to Custom CSS$/) do + on(AppearancePage).css_link_element.should exist +end + +Then(/^I have a link to Custom Javascript$/) do + on(AppearancePage).javascript_link_element.should exist +end + +Then(/^I can select image size$/) do + on(AppearancePage).size_select_element.should exist +end + +Then(/^I can select thumbnail size$/) do + on(AppearancePage).thumb_select_element.should exist +end + +Then(/^I can select Threshold for stub link$/) do + on(AppearancePage).threshold_select_element.should exist +end + +Then(/^I can select underline preferences$/) do + on(AppearancePage).underline_select_element.should exist +end + +Then(/^I have advanced options checkboxes$/) do + on(AppearancePage) do |page| + page.toc_check_element.should exist + page.disable_caching_check_element.should exist + page.hidden_categories_check_element.should exist + page.jump_to_links_check_element.should exist + page.justify_paragraphs_check_element.should exist + page.auto_number_check_element.should exist + page.collapse_sidebar_vector_check_element.should exist + page.exclude_from_experiments_check_element.should exist + page.dont_show_aft_check_element.should exist + end +end + +Then(/^I have Math options radio buttons$/) do + on(AppearancePage) do |page| + page.always_render_radio_element.should exist + page.leave_as_tex_radio_element.should exist + page.mathjax_radio_element.should exist + end +end + +Then(/^I can click Save$/) do + on(AppearancePage).save_button_element.should exist +end + +Then(/^I can restore default settings$/) do + on(AppearancePage).restore_default_link_element.should exist +end diff --git a/features/support/pages/appearance_page.rb b/features/support/pages/appearance_page.rb new file mode 100644 index 0000000..e43c007 --- /dev/null +++ b/features/support/pages/appearance_page.rb @@ -0,0 +1,38 @@ +class AppearancePage + include PageObject + + def self.url + if ENV['MEDIAWIKI_URL'] + mediawiki_url = ENV['MEDIAWIKI_URL'] + else + mediawiki_url = 'http://en.wikipedia.beta.wmflabs.org/wiki/' + end + "#{mediawiki_url}Special:Preferences#mw-prefsection-rendering" + end + page_url url + + radio_button(:always_render_radio, id: 'mw-input-wpmath-0') + checkbox(:auto_number_check, id: 'mw-input-wpnumberheadings') + checkbox(:collapse_sidebar_vector_check, id: 'mw-input-wpvector-collapsiblenav') + radio_button(:cologne_blue, id: 'mw-input-wpskin-cologneblue') + a(:css_link, text:'Custom CSS') + checkbox(:disable_caching_check, id: 'mw-input-wpnocache') + checkbox(:dont_show_aft_check, id: 'mw-input-wparticlefeedback-disable') + checkbox(:exclude_from_experiments_check, id: 'mw-input-wpvector-noexperiments') + checkbox(:hidden_categories_check, id: 'mw-input-wpshowhiddencats') + a(:javascript_link, text: 'Custom JavaScript') + checkbox(:jump_to_links_check, id: 'mw-input-wpshowjumplinks') + checkbox(:justify_paragraphs_check, id: 'mw-input-wpjustify') + radio_button(:leave_as_tex_radio, id: 'mw-input-wpmath-3') + radio_button(:mathjax_radio, id: 'mw-input-wpmath-6') + radio_button(:modern, id: 'mw-input-wpskin-modern') + radio_button(:monobook, id: 'mw-input-wpskin-monobook') + a(:restore_default_link, text:'Restore all default settings') + button(:save_button, text: 'Save') + select_list(:size_select, id: 'mw-input-wpimagesize') + select_list(:threshold_select, id: 'mw-input-wpstubthreshold') + select_list(:thumb_select, id: 'mw-input-wpthumbsize') + checkbox(:toc_check, id: 'mw-input-wpshowtoc') + select_list(:underline_select, id: 'mw-input-wpunderline') + radio_button(:vector, id: 'mw-input-wpskin-vector') +end diff --git a/features/support/pages/preferences_page.rb b/features/support/pages/preferences_page.rb new file mode 100644 index 0000000..bd33d4d --- /dev/null +++ b/features/support/pages/preferences_page.rb @@ -0,0 +1,24 @@ +class PreferencesPage + include PageObject + + def self.url + if ENV['MEDIAWIKI_URL'] + mediawiki_url = ENV['MEDIAWIKI_URL'] + else + mediawiki_url = 'http://en.wikipedia.beta.wmflabs.org/wiki/' + end + "#{mediawiki_url}Special:Preferences" + end + page_url url + + a(:appearance_link, text: 'Appearance') + a(:date_and_time_link, text: 'Date and time') + a(:editing_link, text: 'Editing') + a(:recent_changes_link, text: 'Recent changes') + a(:watchlist_link, text: 'Watchlist') + a(:search_link, text: 'Search') + a(:misc_link, text: 'Misc') + a(:gadgets_link, text: 'Gadgets') + a(:pending_changes_link, text: 'Pending changes') + a(:user_profile_link, text: 'User profile') +end -- To view, visit https://gerrit.wikimedia.org/r/60671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I336b51c95c71f3c9319e8034edf51b3c165a8403 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
