Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-10-21 23:21:13 +0300
committerMike Greiling <mike@pixelcog.com>2017-10-21 23:21:13 +0300
commit285de09f36d1c33d7e052a7bd7ade2706d67fc68 (patch)
tree24788438ce4c56c0334489c9316f2456685e02b3 /spec/support/capybara.rb
parent4082419442bfd7976034815508b4b1a18c52b389 (diff)
add CHROME_HEADLESS environment variable to disable headless mode
Diffstat (limited to 'spec/support/capybara.rb')
-rw-r--r--spec/support/capybara.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index 3755648aaf7..71c86fac3f4 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -9,9 +9,12 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 60 : 30
Capybara.javascript_driver = :chrome
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(
chromeOptions: {
- 'args' => %w[headless no-sandbox disable-gpu --window-size=1240,1400]
+ 'args' => %w[no-sandbox disable-gpu --window-size=1240,1400] + extra_args
}
)