Refactored Autonym font feature
Removed old and ugly steps that are no longer used. Introduced one small and beautiful step. Fixes three failed Jenkins jobs: https://wmf.ci.cloudbees.com/view/r-uls/job/UniversalLanguageSelector-co mmons.wikimedia.beta.wmflabs.org-linux-firefox/128/testReport/(root)/Aut onym%20font/ Change-Id: I68da4364592514d161996517875a06fd2942ff0f
This commit is contained in:
@@ -7,30 +7,30 @@ Feature: Autonym font
|
|||||||
|
|
||||||
@login @commons.wikimedia.beta.wmflabs.org
|
@login @commons.wikimedia.beta.wmflabs.org
|
||||||
Scenario: Autonym font is used in the ULS language search dialog for display language selection by logged-in users
|
Scenario: Autonym font is used in the ULS language search dialog for display language selection by logged-in users
|
||||||
|
|
||||||
Given I am logged in
|
Given I am logged in
|
||||||
When I open "Language" panel of language settings
|
And I open the Universal Language Selector
|
||||||
And I click the button with the ellipsis
|
And I open Display panel of language settings
|
||||||
|
When I click the button with the ellipsis
|
||||||
Then the language list of ULS should use Autonym font
|
Then the language list of ULS should use Autonym font
|
||||||
|
|
||||||
@login @commons.wikimedia.beta.wmflabs.org
|
@login @commons.wikimedia.beta.wmflabs.org
|
||||||
Scenario: Autonym font is used in the ULS language search dialog for input language selection by logged-in users
|
Scenario: Autonym font is used in the ULS language search dialog for input language selection by logged-in users
|
||||||
|
|
||||||
Given I am logged in
|
Given I am logged in
|
||||||
When I open "Input" panel of language settings
|
And I open the Universal Language Selector
|
||||||
And I click the button with the ellipsis
|
And I open Input panel of language settings
|
||||||
|
When I click the button with the ellipsis
|
||||||
Then the language list of ULS should use Autonym font
|
Then the language list of ULS should use Autonym font
|
||||||
|
|
||||||
@login @en.wikipedia.beta.wmflabs.org
|
@login @en.wikipedia.beta.wmflabs.org
|
||||||
Scenario: Autonym font should be used in the Interlanguage area of a page with Interlanguage links
|
Scenario: Autonym font should be used in the Interlanguage area of a page with Interlanguage links
|
||||||
|
|
||||||
Given I am logged in
|
Given I am logged in
|
||||||
When I am on a page with interlanguage links
|
When I am on a page with interlanguage links
|
||||||
Then the Interlanguage area should use Autonym font
|
Then the Interlanguage area should use Autonym font
|
||||||
|
|
||||||
@anon-language-selection @commons.wikimedia.beta.wmflabs.org
|
@anon-language-selection @commons.wikimedia.beta.wmflabs.org
|
||||||
Scenario: Autonym font is used in the ULS language search dialog for input language selection by anonymous users
|
Scenario: Autonym font is used in the ULS language search dialog for input language selection by anonymous users
|
||||||
|
Given I am at random page
|
||||||
When I open "Input" panel of language settings
|
And I open the Universal Language Selector
|
||||||
And I click the button with the ellipsis
|
And I open Input panel of language settings
|
||||||
|
When I click the button with the ellipsis
|
||||||
Then the language list of ULS should use Autonym font
|
Then the language list of ULS should use Autonym font
|
||||||
|
|||||||
3
tests/browser/features/step_definitions/autonym_steps.rb
Normal file
3
tests/browser/features/step_definitions/autonym_steps.rb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Then(/^I open Input panel of language settings$/) do
|
||||||
|
on(PanelPage).panel_input_element.when_visible.click
|
||||||
|
end
|
||||||
@@ -18,27 +18,6 @@ When(/^I open Fonts panel of language settings$/) do
|
|||||||
on(PanelPage).panel_fonts_element.click
|
on(PanelPage).panel_fonts_element.click
|
||||||
end
|
end
|
||||||
|
|
||||||
When(/^I open "(.*?)" panel of language settings$/) do |panel|
|
|
||||||
visit(PanelPage) do |page|
|
|
||||||
# Open the ULS panel if it's not open already
|
|
||||||
if !page.language_settings_dialog_element.visible?
|
|
||||||
# These can be of two different type of elements, which PageObjects do not like.
|
|
||||||
if uls_position() == 'interlanguage'
|
|
||||||
page.trigger_cog_element.when_visible.click
|
|
||||||
elsif uls_position() == 'personal'
|
|
||||||
page.trigger_personal_element.when_visible.click
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
case panel
|
|
||||||
when "Input"
|
|
||||||
page.panel_input_element.when_visible.click
|
|
||||||
else
|
|
||||||
pending
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
When(/^I select (.*?) font for the interface language for the live preview$/) do |font|
|
When(/^I select (.*?) font for the interface language for the live preview$/) do |font|
|
||||||
on(PanelPage).font_for_interface = font
|
on(PanelPage).font_for_interface = font
|
||||||
end
|
end
|
||||||
@@ -47,7 +26,6 @@ When(/^I select (.*?) font for the content language for the live preview$/) do |
|
|||||||
on(PanelPage).font_for_content = font
|
on(PanelPage).font_for_content = font
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
When(/^I close the panel to discard the changes$/) do
|
When(/^I close the panel to discard the changes$/) do
|
||||||
on(PanelPage).panel_button_close_element.click
|
on(PanelPage).panel_button_close_element.click
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user