2020-11-22 16:03:37 +05:30
|
|
|
--- a/spec/support/capybara.rb
|
|
|
|
+++ b/spec/support/capybara.rb
|
|
|
|
@@ -3,7 +3,6 @@
|
|
|
|
# rubocop:disable Style/GlobalVars
|
|
|
|
require 'capybara/rails'
|
|
|
|
require 'capybara/rspec'
|
|
|
|
-require 'capybara-screenshot/rspec'
|
|
|
|
require 'selenium-webdriver'
|
|
|
|
|
|
|
|
# Give CI some extra time
|
2023-07-09 09:48:07 +05:30
|
|
|
@@ -129,18 +128,6 @@
|
2020-11-22 16:03:37 +05:30
|
|
|
Capybara.default_normalize_ws = true
|
|
|
|
Capybara.enable_aria_label = true
|
|
|
|
|
|
|
|
-Capybara::Screenshot.append_timestamp = false
|
|
|
|
-
|
|
|
|
-Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
|
2021-12-11 22:56:32 +05:30
|
|
|
- example.full_description.downcase.parameterize(separator: "_")[0..SCREENSHOT_FILENAME_LENGTH]
|
2020-11-22 16:03:37 +05:30
|
|
|
-end
|
|
|
|
-# 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.include CapybaraHelpers, type: :feature
|
|
|
|
|