Fixed Selenium tests by removing skins not installed by default
authorŽeljko Filipin <zeljko.filipin@gmail.com>
Tue, 16 Feb 2016 11:27:40 +0000 (12:27 +0100)
committerHashar <hashar@free.fr>
Mon, 22 Feb 2016 12:46:49 +0000 (12:46 +0000)
Looks like the tests were developed targeting
en.wikipedia.beta.wmflabs.org that has 4 skins by default. The commit
removes checks for all skins but Vector, which is installed by default. (At least in
my MediaWiki-Vagrant installation.)

Bug: T94150
Change-Id: I68f864bd194dbb251acab3d94699f1e701300ab2

tests/browser/features/preferences.feature
tests/browser/features/step_definitions/preferences_appearance_steps.rb
tests/browser/features/support/pages/preferences_appearance_page.rb

index 9fed9cf..e6dea2e 100644 (file)
@@ -5,7 +5,7 @@ Feature: Preferences
     Given I am logged in
     When I navigate to Preferences
       And I click Appearance
-    Then I can select skins
+    Then I can select skin Vector
       And I can select image size
       And I can select thumbnail size
       And I can select Threshold for stub link
index 133eec3..e1953a0 100644 (file)
@@ -54,11 +54,8 @@ Then(/^I can select my time zone$/) do
   end
 end
 
-Then(/^I can select skins$/) do
+Then(/^I can select skin Vector$/) do
   on(PreferencesAppearancePage) do |page|
-    expect(page.cologne_blue_element).to exist
-    expect(page.modern_element).to exist
-    expect(page.monobook_element).to exist
     expect(page.vector_element).to exist
   end
 end
index 1e5ffaa..4f8fb66 100644 (file)
@@ -15,7 +15,6 @@ class PreferencesAppearancePage
   page_url 'Special:Preferences#mw-prefsection-rendering'
 
   checkbox(:auto_number_check, id: 'mw-input-wpnumberheadings')
-  radio_button(:cologne_blue, id: 'mw-input-wpskin-cologneblue')
   radio_button(:day_mo_year_radio, id: 'mw-input-wpdate-dmy')
   checkbox(:dont_show_aft_check, id: 'mw-input-wparticlefeedback-disable')
   checkbox(:exclude_from_experiments_check, id: 'mw-input-wpvector-noexperiments')
@@ -23,8 +22,6 @@ class PreferencesAppearancePage
   radio_button(:iso_8601_radio, id: 'mw-input-wpdate-ISO_8601')
   span(:local_time_span, id: 'wpLocalTime')
   radio_button(:mo_day_year_radio, id: 'mw-input-wpdate-mdy')
-  radio_button(:modern, id: 'mw-input-wpskin-modern')
-  radio_button(:monobook, id: 'mw-input-wpskin-monobook')
   radio_button(:no_preference_radio, id: 'mw-input-wpdate-default')
   text_field(:other_offset, id: 'mw-input-wptimecorrection-other')
   a(:restore_default_link, id: 'mw-prefs-restoreprefs')