Regression test for bug 56913

Changed class to css because multiple classes don't seem to work.
Used _element.text because css selectors seem to return [] by default.

https://mingle.corp.wikimedia.org/projects/internationalization/cards/3822

Change-Id: Ide8c7bd22cc23bb84f24f99faf6b14c2d2ce91de
This commit is contained in:
Niklas Laxström
2013-11-21 11:44:20 +02:00
parent ded20c61f2
commit 2244518711
3 changed files with 18 additions and 2 deletions

View File

@@ -73,3 +73,15 @@ Feature: Settings panel
And I use the panel to change my interface language to "German" And I use the panel to change my interface language to "German"
And I apply the changes And I apply the changes
Then my interface language is "German" Then my interface language is "German"
@commons.wikimedia.beta.wmflabs.org @login
Scenario: Regression test for bug 56913
Given I am logged in
When I open the Universal Language Selector
And I open Input panel of language settings
And I click the button with the ellipsis
And I use the panel to change my input language to "Finnish"
And I close the panel to discard the changes
And I open Input panel of language settings
Then I should see English as the selected input language

View File

@@ -53,7 +53,7 @@ Then(/^a font selector for content language appears$/) do
on(PanelPage).panel_content_font_selector_element.should be_visible on(PanelPage).panel_content_font_selector_element.should be_visible
end end
When(/^I use the panel to change my interface language to "(.*?)"$/) do |language| When(/^I use the panel to change my (?:interface|input) language to "(.*?)"$/) do |language|
code = on(PanelPage).language_to_code(language) code = on(PanelPage).language_to_code(language)
on(IMEPage) do |page| on(IMEPage) do |page|
page.language_filter = code page.language_filter = code
@@ -77,3 +77,7 @@ end
Then(/^the Interlanguage area should use Autonym font$/) do Then(/^the Interlanguage area should use Autonym font$/) do
on(InterlanguagePage).interlang_link_element.style("font-family").should == "'Autonym',sans-serif" on(InterlanguagePage).interlang_link_element.style("font-family").should == "'Autonym',sans-serif"
end end
Then(/^I should see (.*) as the selected input language$/) do |language|
on(PanelPage).default_language_button_element.text.should == language
end

View File

@@ -28,7 +28,7 @@ class PanelPage
# TODO: Rename to match convention # TODO: Rename to match convention
button(:other_language_button, class: 'button uls-language-button', index: 1) button(:other_language_button, class: 'button uls-language-button', index: 1)
button(:default_language_button, class: 'button uls-language-button down') button(:default_language_button, css: '.uls-language-button.down')
# Triggers # Triggers
span(:trigger_cog, class: 'uls-settings-trigger') span(:trigger_cog, class: 'uls-settings-trigger')