Unverified Commit b977e9c3 authored by flaburgan's avatar flaburgan Committed by Benjamin Neff

Save a screenshot of the page in tmp/capybara when a cucumber test is failing

closes #7912
parent 65e0f90b
......@@ -77,3 +77,8 @@ Before do |scenario|
# Reset overridden settings
AppConfig.reset_dynamic!
end
After do |scenario|
Capybara.save_path = ENV["SCREENSHOT_PATH"]
page.save_screenshot("#{Time.now.utc} #{scenario.name}.png", full: true) if scenario.failed? && ENV["SCREENSHOT_PATH"]
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment