Improved timings for chrome.

This commit is contained in:
Martin Edenhofer 2015-12-18 20:32:00 +01:00
parent 477fb1d3da
commit ce6e414362
2 changed files with 11 additions and 3 deletions

View file

@ -53,12 +53,15 @@ class TranslationTest < TestCase
css: '#content input.js-Item[data-source="Translations"]', css: '#content input.js-Item[data-source="Translations"]',
value: 'Übersetzung2', value: 'Übersetzung2',
) )
sleep 5 # wait until nofify is gone
click(css: '#global-search') click(css: '#global-search')
sleep 4 # wait till rerender
click(css: 'a[href="#dashboard"]') click(css: 'a[href="#dashboard"]')
sleep 2 # wait till nav is rendered
click(css: 'a[href="#manage"]') click(css: 'a[href="#manage"]')
click(css: 'a[href="#system/translation"]') click(css: 'a[href="#system/translation"]')
sleep 4
match( match(
css: '#content .sidebar', css: '#content .sidebar',
@ -84,6 +87,7 @@ class TranslationTest < TestCase
) )
click(css: 'a[href="#dashboard"]') click(css: 'a[href="#dashboard"]')
sleep 4 # wait till rerender
click(css: 'a[href="#manage"]') click(css: 'a[href="#manage"]')
click(css: 'a[href="#system/translation"]') click(css: 'a[href="#system/translation"]')

View file

@ -18,8 +18,12 @@ class TestCase < Test::Unit::TestCase
browser_profile['intl.accept_languages'] = 'en-US' browser_profile['intl.accept_languages'] = 'en-US'
browser_profile['general.useragent.locale'] = 'en-US' browser_profile['general.useragent.locale'] = 'en-US'
elsif browser == 'chrome' elsif browser == 'chrome'
browser_profile = Selenium::WebDriver::Chrome::Profile.new
browser_profile['intl.accept_languages'] = 'en' # profile are only working on remote selenium
if ENV['REMOTE_URL']
browser_profile = Selenium::WebDriver::Chrome::Profile.new
browser_profile['intl.accept_languages'] = 'en'
end
end end
browser_profile browser_profile
end end