Merge pull request #2658 from AndrewKvalheim/save-screenshot

Fix bug in logging of screenshots of failed tests
This commit is contained in:
Henne Vogelsang 2021-03-06 20:01:13 +01:00 committed by GitHub
commit fc61c4b39c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ RSpec.configure do |config|
example_filename += '.html'
if RSpec.current_example.exception.present?
save_page(example_filename)
save_page(example_screenshotname)
save_screenshot(example_screenshotname) # rubocop:disable Lint/Debugger
# remove the file if the test starts working again
else
File.unlink(example_filename) if File.exist?(example_filename)