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:
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
}
)