Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/91359


Change subject: Refactoring of ULS font selection tests
......................................................................

Refactoring of ULS font selection tests

Change-Id: Ie4d5843f76bff277750a2d61a13b3297650e52f7
---
M tests/browser/features/font_selection.feature
A tests/browser/features/step_definitions/font_selection_steps.rb
2 files changed, 16 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/59/91359/1

diff --git a/tests/browser/features/font_selection.feature 
b/tests/browser/features/font_selection.feature
index a735b72..c70b2ed 100644
--- a/tests/browser/features/font_selection.feature
+++ b/tests/browser/features/font_selection.feature
@@ -1,4 +1,4 @@
-@login @reset-preferences-after @commons.wikimedia.beta.wmflabs.org
[email protected] @login @reset-preferences-after
 Feature: Font selection
 
   In order to have better using experience,
@@ -12,14 +12,15 @@
   Background:
     Given I am logged in
       And I set "German" as the interface language
+      And I open ULS
+      And I open display settings
+    When I open fonts panel of language settings
 
   Scenario: Font selector appears
-    When I open "Fonts" panel of language settings
     Then a font selector for interface language appears
-    Then a font selector for content language appears
+      And a font selector for content language appears
 
   Scenario: Discarding live preview of content font
-    When I open "Fonts" panel of language settings
       And I select "OpenDyslexic" font for the content language for the live 
preview
       And I close the panel to discard the changes
     Then the active content font must be the same as font prior to the preview
@@ -27,7 +28,6 @@
       And the selected content font must be "system"
 
   Scenario: Discarding live preview of interface font
-    When I open "Fonts" panel of language settings
       And I select "OpenDyslexic" font for the interface language for the live 
preview
       And I close the panel to discard the changes
     Then the active interface font must be the same as font prior to the 
preview
@@ -35,7 +35,6 @@
       And the selected interface font must be "system"
 
   Scenario: Applying the live preview of interface font
-    When I open "Fonts" panel of language settings
       And I select "OpenDyslexic" font for the interface language for the live 
preview
       And I apply the changes
     Then the interface font must be changed to the "OpenDyslexic" font
diff --git a/tests/browser/features/step_definitions/font_selection_steps.rb 
b/tests/browser/features/step_definitions/font_selection_steps.rb
new file mode 100644
index 0000000..125dbc7
--- /dev/null
+++ b/tests/browser/features/step_definitions/font_selection_steps.rb
@@ -0,0 +1,11 @@
+Given(/^I open ULS$/) do
+       on(PanelPage).trigger_personal_element.when_visible.click
+end
+
+Given(/^I open display settings$/) do
+       on(PanelPage).panel_display_element.when_visible.click
+end
+
+When(/^I open fonts panel of language settings$/) do
+       on(PanelPage).panel_fonts_element.click
+end

-- 
To view, visit https://gerrit.wikimedia.org/r/91359
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4d5843f76bff277750a2d61a13b3297650e52f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to