Merge "Autonym font integration tests."
This commit is contained in:
36
tests/browser/features/autonym.feature
Normal file
36
tests/browser/features/autonym.feature
Normal file
@@ -0,0 +1,36 @@
|
||||
Feature: Autonym font
|
||||
|
||||
* Web font should always be applied to the ULS language selector's language
|
||||
selection screen for display and input languages.
|
||||
* Web font should always be applied to the interlanguage section of MediaWiki
|
||||
when MediaWiki extension ULS is installed.
|
||||
|
||||
@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
|
||||
|
||||
Given I am logged in
|
||||
When I open "Language" panel of language settings
|
||||
And I click the button with the ellipsis
|
||||
Then the language list of ULS should use Autonym font
|
||||
|
||||
@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
|
||||
|
||||
Given I am logged in
|
||||
When I open "Input" panel of language settings
|
||||
And I click the button with the ellipsis
|
||||
Then the language list of ULS should use Autonym font
|
||||
|
||||
@login @en.wikipedia.beta.wmflabs.org
|
||||
Scenario: Autonym font should be used in the Interlanguage area of a page with Interlanguage links
|
||||
|
||||
Given I am logged in
|
||||
When I am on a page with interlanguage links
|
||||
Then the Interlanguage area should use Autonym font
|
||||
|
||||
@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
|
||||
|
||||
When I open "Input" panel of language settings
|
||||
And I click the button with the ellipsis
|
||||
Then the language list of ULS should use Autonym font
|
||||
@@ -3,7 +3,7 @@ Then(/^I see "(.*?)" as the name of the content language$/) do |text|
|
||||
end
|
||||
|
||||
When(/^I open "(.*?)" panel of language settings$/) do |panel|
|
||||
on(PanelPage) do |page|
|
||||
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.
|
||||
@@ -78,3 +78,11 @@ end
|
||||
When(/^I switch to "Input" panel of language settings/) do
|
||||
on(PanelPage).panel_input_element.when_visible.click
|
||||
end
|
||||
|
||||
Then(/^the language list of ULS should use Autonym font$/) do
|
||||
on(PanelPage).autonym_element.style("font-family").should == "'Autonym',sans-serif"
|
||||
end
|
||||
|
||||
Then(/^the Interlanguage area should use Autonym font$/) do
|
||||
on(InterlanguagePage).interlang_link_element.style("font-family").should == "'Autonym',sans-serif"
|
||||
end
|
||||
|
||||
@@ -19,4 +19,5 @@ module InterlanguagePageModule
|
||||
span(:x, id: 'languagesettings-close')
|
||||
a(:how_to_use_ml_transliteration, href: 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:UniversalLanguageSelector/Input_methods/ml-transliteration')
|
||||
a(:edit_link, css: '#ca-edit a')
|
||||
a(:interlang_link, css: '#p-lang ul')
|
||||
end
|
||||
|
||||
@@ -13,6 +13,8 @@ class PanelPage
|
||||
button(:panel_fonts, id: 'uls-display-settings-fonts-tab')
|
||||
button(:panel_language, id: 'uls-display-settings-language-tab')
|
||||
|
||||
ul(:autonym, class: 'three columns end')
|
||||
|
||||
span(:panel_button_close, id: 'languagesettings-close')
|
||||
button(:panel_button_apply, class: 'uls-settings-apply')
|
||||
button(:panel_button_cancel, class: 'uls-settings-cancel')
|
||||
@@ -45,9 +47,11 @@ class PanelPage
|
||||
def content_font
|
||||
font('#mw-content-text')
|
||||
end
|
||||
|
||||
def interface_font
|
||||
font('body')
|
||||
end
|
||||
|
||||
def language_to_code(language)
|
||||
case language
|
||||
when 'German'
|
||||
|
||||
Reference in New Issue
Block a user