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:
-rw-r--r--features/support/capybara.rb8
-rw-r--r--spec/support/capybara.rb8
2 files changed, 10 insertions, 6 deletions
diff --git a/features/support/capybara.rb b/features/support/capybara.rb
index aaec9a6ece7..31dbf0feb2f 100644
--- a/features/support/capybara.rb
+++ b/features/support/capybara.rb
@@ -16,7 +16,9 @@ end
Capybara.default_wait_time = timeout
Capybara.ignore_hidden_elements = false
-require 'capybara-screenshot/spinach'
+unless ENV['CI'] || ENV['CI_SERVER']
+ require 'capybara-screenshot/spinach'
-# Keep only the screenshots generated from the last failing test suite
-Capybara::Screenshot.prune_strategy = :keep_last_run
+ # Keep only the screenshots generated from the last failing test suite
+ Capybara::Screenshot.prune_strategy = :keep_last_run
+end
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index ead99abddc8..fed1ab6ee33 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -13,7 +13,9 @@ end
Capybara.default_wait_time = timeout
Capybara.ignore_hidden_elements = true
-require 'capybara-screenshot/rspec'
+unless ENV['CI'] || ENV['CI_SERVER']
+ require 'capybara-screenshot/rspec'
-# Keep only the screenshots generated from the last failing test suite
-Capybara::Screenshot.prune_strategy = :keep_last_run
+ # Keep only the screenshots generated from the last failing test suite
+ Capybara::Screenshot.prune_strategy = :keep_last_run
+end