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:
authorStan Hu <stanhu@gmail.com>2019-06-03 20:19:29 +0300
committerStan Hu <stanhu@gmail.com>2019-06-03 21:19:41 +0300
commitb1ce6f9ea989bfb3d4b1632dba234347c92b35a8 (patch)
tree517c58c547b82f721841a03e03d87c4f4b254637
parent88a12332dd38a8416b18c28b3465dbd35e490a27 (diff)
Disable Google Chrome helper dialogs in tests
Chrome V74 has a bug where dialog boxes may be presented in headless mode: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2870. This disables that feature.
-rw-r--r--spec/support/capybara.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index 875a9a76e12..1836b5f9024 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -36,6 +36,9 @@ Capybara.register_driver :chrome do |app|
# Chrome won't work properly in a Docker container in sandbox mode
options.add_argument("no-sandbox")
+ # https://bugs.chromium.org/p/chromedriver/issues/detail?id=2870
+ options.add_argument('enable-features=NetworkService,NetworkServiceInProcess')
+
# Run headless by default unless CHROME_HEADLESS specified
options.add_argument("headless") unless ENV['CHROME_HEADLESS'] =~ /^(false|no|0)$/i