From b0f88ec75fe412246dac1747c17fcbd2bafbff9d Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Wed, 19 Jun 2019 16:04:43 -0700 Subject: [PATCH] Add test for disabling of animations on pseudo elements --- lib/capybara/spec/views/with_animation.erb | 30 +++++++++++++++++++++- spec/shared_selenium_session.rb | 8 +++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/lib/capybara/spec/views/with_animation.erb b/lib/capybara/spec/views/with_animation.erb index e83da246..c64ae040 100644 --- a/lib/capybara/spec/views/with_animation.erb +++ b/lib/capybara/spec/views/with_animation.erb @@ -6,6 +6,17 @@ + transition me away - animate me away + + animate me away + diff --git a/spec/shared_selenium_session.rb b/spec/shared_selenium_session.rb index 0726899e..4937e154 100644 --- a/spec/shared_selenium_session.rb +++ b/spec/shared_selenium_session.rb @@ -355,11 +355,17 @@ RSpec.shared_examples 'Capybara::Session' do |session, mode| expect(@animation_session).to have_no_link('transition me away', wait: 0.5) end - it 'should disable CSS animations' do + it 'should disable CSS animations (set to 0s)' do @animation_session.visit('with_animation') @animation_session.click_link('animate me away') expect(@animation_session).to have_no_link('animate me away', wait: 0.5) end + + it 'should disable CSS animations on pseudo elements (set to 0s)' do + @animation_session.visit('with_animation') + @animation_session.find_link('animate me away').right_click + expect(@animation_session).to have_content('Animation Ended', wait: 0.1) + end end context 'if we pass in css that matches elements' do