Merge pull request #6971 from svbergerem/poltergeist-disable-animations

Disable animations in poltergeist
This commit is contained in:
Dennis Schubert 2016-08-11 20:44:03 -04:00
commit 23d8af9e07
No known key found for this signature in database
GPG key ID: 5A0304BEA7966D7E
7 changed files with 30 additions and 16 deletions

View file

@ -0,0 +1,9 @@
// Overrides used for poltergeist tests
// scss-lint:disable all
* {
-moz-transition: none !important;
-o-transition: none !important;
-webkit-transition: none !important;
transition: none !important;
}
// scss-lint:enable all

View file

@ -26,6 +26,9 @@
- if rtl? - if rtl?
= stylesheet_link_tag :rtl, media: 'all' = stylesheet_link_tag :rtl, media: 'all'
- if Rails.env.test?
= stylesheet_link_tag :poltergeist_disable_transition, media: "all"
= old_browser_js_support = old_browser_js_support
<!--[if IE]> <!--[if IE]>
= javascript_include_tag :ie = javascript_include_tag :ie

View file

@ -46,6 +46,9 @@
- if rtl? - if rtl?
= stylesheet_link_tag :rtl, :media => 'all' = stylesheet_link_tag :rtl, :media => 'all'
- if Rails.env.test?
= stylesheet_link_tag :poltergeist_disable_transition, media: "all"
= yield(:head) = yield(:head)
= include_gon(:camel_case => true) = include_gon(:camel_case => true)

View file

@ -55,7 +55,6 @@ Feature: new user registration
Scenario: closing a popover clears getting started Scenario: closing a popover clears getting started
When I confirm the alert after I follow "awesome_button" When I confirm the alert after I follow "awesome_button"
Then I should be on the stream page Then I should be on the stream page
And I have turned off jQuery effects
And I wait for the popovers to appear And I wait for the popovers to appear
And I click close on all the popovers And I click close on all the popovers
And I close the publisher And I close the publisher

View file

@ -30,15 +30,15 @@ Feature: Navigate between pages using the header menu and the drawer
Then I should be on the new status message page Then I should be on the new status message page
Scenario: search a user Scenario: search a user
When I have turned off jQuery effects When I open the drawer
And I open the drawer Then I should see a "#q" within "#drawer"
And I search for "Bob" When I search for "Bob"
Then I should see "Users matching Bob" within "#search_title" Then I should see "Users matching Bob" within "#search_title"
Scenario: search for a tag Scenario: search for a tag
When I have turned off jQuery effects When I open the drawer
And I open the drawer Then I should see a "#q" within "#drawer"
And I search for "#bob" When I search for "#bob"
Then I should be on the tag page for "bob" Then I should be on the tag page for "bob"
Scenario: navigate to my activity page Scenario: navigate to my activity page

View file

@ -255,16 +255,16 @@ Then 'I press the attached image' do
end end
And "I wait for the popovers to appear" do And "I wait for the popovers to appear" do
page.should have_selector(".popover", count: 3) expect(page).to have_selector(".popover", count: 3)
end end
And /^I click close on all the popovers$/ do And /^I click close on all the popovers$/ do
page.execute_script("$('.popover .close')[0].click();") find(".popover .close", match: :first).click
expect(page).to have_selector(".popover", count: 2) expect(page).to have_selector(".popover", count: 2, visible: false)
page.execute_script("$('.popover .close')[0].click();") find(".popover .close", match: :first).click
expect(page).to have_selector(".popover", count: 1) expect(page).to have_selector(".popover", count: 1, visible: false)
page.execute_script("$('.popover .close').click();") find(".popover .close", match: :first).click
expect(page).to_not have_selector(".popover .close") expect(page).to_not have_selector(".popover", visible: false)
end end
Then /^I should see a flash message indicating success$/ do Then /^I should see a flash message indicating success$/ do

View file

@ -36,10 +36,10 @@ Capybara.javascript_driver = :poltergeist
Capybara.default_selector = :css Capybara.default_selector = :css
# We have a ridiculously high wait time to account for build machines of various beefiness. # We have a ridiculously high wait time to account for build machines of various beefiness.
# Capybara.default_max_wait_time = 30 Capybara.default_max_wait_time = 30
# While there are a lot of failures, wait less, avoiding travis timeout # While there are a lot of failures, wait less, avoiding travis timeout
Capybara.default_max_wait_time = 15 # Capybara.default_max_wait_time = 15
# If you set this to false, any error raised from within your app will bubble # If you set this to false, any error raised from within your app will bubble
# up to your step definition and out to cucumber unless you catch it somewhere # up to your step definition and out to cucumber unless you catch it somewhere