Capybara Tip: Disabling CSS Animations
You can disable CSS animations and transitions globally by setting the Capybara.disable_animation
option.
Stick this in your rails_helper.rb
:
Capybara.disable_animation = true
Instead of a boolean, you can set this option to a CSS selector and it will only disable animations that match that selector:
Capybara.disable_animation = '#with_animation a'
For a better understanding of how this works take a look at the tests for Capybara.disable_animation
in the Capybara source code.