Merge "Autonym font integration tests."

This commit is contained in:
jenkins-bot
2013-10-31 04:38:48 +00:00
committed by Gerrit Code Review
4 changed files with 50 additions and 1 deletions

View 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

View File

@@ -3,7 +3,7 @@ Then(/^I see "(.*?)" as the name of the content language$/) do |text|
end end
When(/^I open "(.*?)" panel of language settings$/) do |panel| 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 # Open the ULS panel if it's not open already
if !page.language_settings_dialog_element.visible? if !page.language_settings_dialog_element.visible?
# These can be of two different type of elements, which PageObjects do not like. # 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 When(/^I switch to "Input" panel of language settings/) do
on(PanelPage).panel_input_element.when_visible.click on(PanelPage).panel_input_element.when_visible.click
end 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

View File

@@ -19,4 +19,5 @@ module InterlanguagePageModule
span(:x, id: 'languagesettings-close') 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(: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(:edit_link, css: '#ca-edit a')
a(:interlang_link, css: '#p-lang ul')
end end

View File

@@ -13,6 +13,8 @@ class PanelPage
button(:panel_fonts, id: 'uls-display-settings-fonts-tab') button(:panel_fonts, id: 'uls-display-settings-fonts-tab')
button(:panel_language, id: 'uls-display-settings-language-tab') button(:panel_language, id: 'uls-display-settings-language-tab')
ul(:autonym, class: 'three columns end')
span(:panel_button_close, id: 'languagesettings-close') span(:panel_button_close, id: 'languagesettings-close')
button(:panel_button_apply, class: 'uls-settings-apply') button(:panel_button_apply, class: 'uls-settings-apply')
button(:panel_button_cancel, class: 'uls-settings-cancel') button(:panel_button_cancel, class: 'uls-settings-cancel')
@@ -45,9 +47,11 @@ class PanelPage
def content_font def content_font
font('#mw-content-text') font('#mw-content-text')
end end
def interface_font def interface_font
font('body') font('body')
end end
def language_to_code(language) def language_to_code(language)
case language case language
when 'German' when 'German'