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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index 5d8779ec782..90adfb1a2ee 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -126,6 +126,12 @@ RSpec.configure do |config|
Capybara.raise_server_errors = false
example.run
+
+ if example.metadata[:screenshot]
+ screenshot = example.metadata[:screenshot][:image] || example.metadata[:screenshot][:html]
+ example.metadata[:stdout] = %{[[ATTACHMENT|#{screenshot}]]}
+ end
+
ensure
Capybara.raise_server_errors = true
end