Regression: Using [...] to change language does not activate apply button

Bug: 53736
Change-Id: If52beb73f9f3f74cde63bd846974540682066ab6
This commit is contained in:
Niklas Laxström
2013-09-04 06:53:35 +00:00
committed by Nemo bis
parent ba065b586c
commit e36d9b1cc3
3 changed files with 30 additions and 8 deletions

View File

@@ -31,6 +31,15 @@ Given(/^the content language is "(.*?)"$/) do |language|
actual.should == code
end
Given(/^the interface language is "(.*?)"$/) do |language|
# phantomjs needs little bit time because it executes the script before
# the page is fully loaded
sleep 0.5;
code = language_to_code(language)
actual = @browser.execute_script( "return mw.config.get( 'wgUserLanguage' )" )
actual.should == code
end
def language_to_code(language)
case language
when 'German'