You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello guys.
In our application we use your gem and it works great with RSpec, Capybara. It creates screenshots for failed tests on local machine and after running Github Actions.
But we have a problem cleaning old screenshots in tmp/screenshots folder. The project is configured with default settings, so images are saved in the screenshots folder. New screenshots of failed tests are added to old ones and are difficult to find and distinguish from others.
The documentation states that capybara-screenshot has a default prune_strategy method for this, but it doesn't seem to work. Do you have any idea why it doesn't work and how you can fix it?
Here some setting from the project that might be useful:
requireFile.expand_path('../config/environment',__dir__)abort('The Rails environment is running in production mode!')ifRails.env.production? || Rails.env.staging?require'rspec/rails'# Add additional requires below this line. Rails is not loaded until this point!require'capybara/rspec'require'capybara-screenshot/rspec'Capybara.asset_host='http://localhost:5000'Capybara::Screenshot.prune_strategy=:keep_last_run# Also tried with this config:# Capybara::Screenshot.prune_strategy = { keep: 20 }
Thanks)
The text was updated successfully, but these errors were encountered:
Hello guys.
In our application we use your gem and it works great with RSpec, Capybara. It creates screenshots for failed tests on local machine and after running Github Actions.
But we have a problem cleaning old screenshots in
tmp/screenshots
folder. The project is configured with default settings, so images are saved in the screenshots folder. New screenshots of failed tests are added to old ones and are difficult to find and distinguish from others.The documentation states that capybara-screenshot has a default prune_strategy method for this, but it doesn't seem to work. Do you have any idea why it doesn't work and how you can fix it?
Here some setting from the project that might be useful:
Gemfile:
spec/rails_helper.rb:
Thanks)
The text was updated successfully, but these errors were encountered: