Skip to content

Commit

Permalink
Remove recommendation for Capybara disable_animation (#40)
Browse files Browse the repository at this point in the history
Capybara's `disable_animation` option inserts a middleware that can
conflict with other middleware, like `Rack::Deflater`. If removing
animation is important for speeding up system tests, a more direct way
to do it is to conditionally add CSS/JS to the application layout,
rather rely on a middleware that could have unexpected side effects.

Given the potential complications, I am removing `disable_animation`
from the default Capybara config file that nextgen generates.
  • Loading branch information
mattbrictson committed Feb 2, 2024
1 parent afdae2d commit 75b020b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion template/test/support/capybara.rb.tt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ require "capybara/rspec"

Capybara.configure do |config|
config.default_max_wait_time = 2
config.disable_animation = true
config.enable_aria_label = true
config.server = :puma, {Silent: true}
config.test_id = "data-testid"
Expand Down

0 comments on commit 75b020b

Please sign in to comment.