Sha256: 02618b109e9c97eabaad1ba5766f4d3892434bb8c82c857a6f0ff7b6a58cee6c

Contents?: true

Size: 874 Bytes

Versions: 13

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

require 'capybara-screenshot/rspec'

::Capybara::Screenshot.autosave_on_failure = true
::Capybara::Screenshot.prune_strategy      = :keep_last_run

::Capybara::Screenshot::RSpec.add_link_to_screenshot_for_failed_examples = false

::Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
  example.full_description.downcase.tr(' ', '-').gsub(%r{^.*/spec/}, '')
end

::Capybara::Screenshot.register_driver(:chrome)           { |driver, path| driver.browser.save_screenshot(path) }
::Capybara::Screenshot.register_driver(:headless_chrome)  { |driver, path| driver.browser.save_screenshot(path) }
::Capybara::Screenshot.register_driver(:firefox)          { |driver, path| driver.browser.save_screenshot(path) }
::Capybara::Screenshot.register_driver(:headless_firefox) { |driver, path| driver.browser.save_screenshot(path) }

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rspeckled-2.0.1 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-2.0.0 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.4.0 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.3.1 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.3.0 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.2.1 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.2.0 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.1.3 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.1.2 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.1.1 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.1.0 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.0.5 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-1.0.4 lib/rspeckled/plugins/configuration/capybara_screenshot.rb