Skip to content
Snippets Groups Projects
Commit bc773967 authored by Mark Lapierre's avatar Mark Lapierre
Browse files

Merge branch 'mo-fix-capybara-screenshot-attachment' into 'master'

Fix capybara screenshot attachment

See merge request gitlab-org/gitlab!61515
parents 36733fdc 3ffea8a4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -170,14 +170,16 @@
Capybara.raise_server_errors = false
 
example.run
ensure
Capybara.raise_server_errors = true
end
 
config.append_after do |example|
if example.metadata[:screenshot]
screenshot = example.metadata[:screenshot][:image] || example.metadata[:screenshot][:html]
screenshot&.delete_prefix!(ENV.fetch('CI_PROJECT_DIR', ''))
example.metadata[:stdout] = %{[[ATTACHMENT|#{screenshot}]]}
end
ensure
Capybara.raise_server_errors = true
end
 
config.after(:example, :js) do |example|
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment