Commit 285de09f authored by Mike Greiling's avatar Mike Greiling

add CHROME_HEADLESS environment variable to disable headless mode

parent 40824194
...@@ -9,9 +9,12 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 60 : 30 ...@@ -9,9 +9,12 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 60 : 30
Capybara.javascript_driver = :chrome Capybara.javascript_driver = :chrome
Capybara.register_driver :chrome do |app| Capybara.register_driver :chrome do |app|
extra_args = []
extra_args << 'headless' unless ENV['CHROME_HEADLESS'] =~ /^(false|no|0)$/i
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { chromeOptions: {
'args' => %w[headless no-sandbox disable-gpu --window-size=1240,1400] 'args' => %w[no-sandbox disable-gpu --window-size=1240,1400] + extra_args
} }
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment