test chrome headless with chrome beta

This commit is contained in:
Thomas Walpole 2017-05-03 15:21:07 -07:00
parent a09b64b81b
commit ed7eb733e3
2 changed files with 9 additions and 2 deletions

View File

@ -42,6 +42,7 @@ matrix:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
- awesome
- gemfile: gemfiles/Gemfile.ruby-20
env:

View File

@ -5,13 +5,19 @@ require 'shared_selenium_session'
Capybara.register_driver :selenium_chrome do |app|
args = ENV['TRAVIS'] ? ['no-sandbox' ] : []
args << 'headless' if ENV['CAPYBARA_CHROME_HEADLESS']
if ENV['CAPYBARA_CHROME_HEADLESS']
args << 'headless'
Selenium::WebDriver::Chrome.path='/usr/bin/google-chrome-beta' if ENV['TRAVIS']
end
Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
end
Capybara.register_driver :selenium_chrome_clear_storage do |app|
args = ENV['TRAVIS'] ? ['no-sandbox' ] : []
args << 'headless' if ENV['CAPYBARA_CHROME_HEADLESS']
if ENV['CAPYBARA_CHROME_HEADLESS']
args << 'headless'
Selenium::WebDriver::Chrome.path='/usr/bin/google-chrome-beta' if ENV['TRAVIS']
end
Capybara::Selenium::Driver.new(app, :browser => :chrome,
:args => args,
clear_local_storage: true,