summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorddavison <ddavison@gitlab.com>2019-06-05 14:02:47 -0700
committerddavison <ddavison@gitlab.com>2019-06-05 14:02:47 -0700
commit3300a17fdbbb74b815c51242bf6f8608a3ba426a (patch)
treeec2c44b32f4cbaa7c0d60e203804698c2126dcb9
parent92b06c13bd12abf85f6beb18b3b5c2f0e38c2760 (diff)
downloadgitlab-ce-disable-capybara-auto-screenshots.tar.gz
Dont save Screenshots automaticallydisable-capybara-auto-screenshots
Its possible that the screenshots are either A] not able to be taken as the session is destroyed by capybara, or B] the space on the runners in question might be filling up tmp/capybara/
-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..7882417ee3a 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -54,6 +54,9 @@ Capybara.javascript_driver = :chrome
Capybara.default_max_wait_time = timeout
Capybara.ignore_hidden_elements = true
+# Disable screenshots to be automatically taken when a test fails.
+Capybara::Screenshot.autosave_on_failure = false
+
# Keep only the screenshots generated from the last failing test suite
Capybara::Screenshot.prune_strategy = :keep_last_run
# From https://github.com/mattheworiordan/capybara-screenshot/issues/84#issuecomment-41219326