diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/support/capybara.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/support/capybara.rb')
-rw-r--r-- | spec/support/capybara.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index be2b41d6997..f9a28c8e40b 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -157,7 +157,7 @@ RSpec.configure do |config| unless session.current_window.size == CAPYBARA_WINDOW_SIZE begin session.current_window.resize_to(*CAPYBARA_WINDOW_SIZE) - rescue # ? + rescue StandardError # ? end end end @@ -170,14 +170,16 @@ RSpec.configure do |config| 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| |