diff options
Diffstat (limited to 'spec/support/capybara.rb')
-rw-r--r-- | spec/support/capybara.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index fbe8ae30565..4a4b037d0b1 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -24,6 +24,10 @@ Capybara.ignore_hidden_elements = true # Keep only the screenshots generated from the last failing test suite Capybara::Screenshot.prune_strategy = :keep_last_run +# From https://github.com/mattheworiordan/capybara-screenshot/issues/84#issuecomment-41219326 +Capybara::Screenshot.register_driver(:chrome) do |driver, path| + driver.browser.save_screenshot(path) +end RSpec.configure do |config| config.before(:context, :js) do |