Merge pull request #6971 from svbergerem/poltergeist-disable-animations
Disable animations in poltergeist
This commit is contained in:
commit
23d8af9e07
7 changed files with 30 additions and 16 deletions
|
|
@ -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
|
||||
|
|
@ -26,6 +26,9 @@
|
|||
- if rtl?
|
||||
= stylesheet_link_tag :rtl, media: 'all'
|
||||
|
||||
- if Rails.env.test?
|
||||
= stylesheet_link_tag :poltergeist_disable_transition, media: "all"
|
||||
|
||||
= old_browser_js_support
|
||||
<!--[if IE]>
|
||||
= javascript_include_tag :ie
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@
|
|||
- if rtl?
|
||||
= stylesheet_link_tag :rtl, :media => 'all'
|
||||
|
||||
- if Rails.env.test?
|
||||
= stylesheet_link_tag :poltergeist_disable_transition, media: "all"
|
||||
|
||||
= yield(:head)
|
||||
|
||||
= include_gon(:camel_case => true)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ Feature: new user registration
|
|||
Scenario: closing a popover clears getting started
|
||||
When I confirm the alert after I follow "awesome_button"
|
||||
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 click close on all the popovers
|
||||
And I close the publisher
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
Scenario: search a user
|
||||
When I have turned off jQuery effects
|
||||
And I open the drawer
|
||||
And I search for "Bob"
|
||||
When I open the drawer
|
||||
Then I should see a "#q" within "#drawer"
|
||||
When I search for "Bob"
|
||||
Then I should see "Users matching Bob" within "#search_title"
|
||||
|
||||
Scenario: search for a tag
|
||||
When I have turned off jQuery effects
|
||||
And I open the drawer
|
||||
And I search for "#bob"
|
||||
When I open the drawer
|
||||
Then I should see a "#q" within "#drawer"
|
||||
When I search for "#bob"
|
||||
Then I should be on the tag page for "bob"
|
||||
|
||||
Scenario: navigate to my activity page
|
||||
|
|
|
|||
|
|
@ -255,16 +255,16 @@ Then 'I press the attached image' do
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
And /^I click close on all the popovers$/ do
|
||||
page.execute_script("$('.popover .close')[0].click();")
|
||||
expect(page).to have_selector(".popover", count: 2)
|
||||
page.execute_script("$('.popover .close')[0].click();")
|
||||
expect(page).to have_selector(".popover", count: 1)
|
||||
page.execute_script("$('.popover .close').click();")
|
||||
expect(page).to_not have_selector(".popover .close")
|
||||
find(".popover .close", match: :first).click
|
||||
expect(page).to have_selector(".popover", count: 2, visible: false)
|
||||
find(".popover .close", match: :first).click
|
||||
expect(page).to have_selector(".popover", count: 1, visible: false)
|
||||
find(".popover .close", match: :first).click
|
||||
expect(page).to_not have_selector(".popover", visible: false)
|
||||
end
|
||||
|
||||
Then /^I should see a flash message indicating success$/ do
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ Capybara.javascript_driver = :poltergeist
|
|||
Capybara.default_selector = :css
|
||||
|
||||
# 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
|
||||
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
|
||||
# up to your step definition and out to cucumber unless you catch it somewhere
|
||||
|
|
|
|||
Loading…
Reference in a new issue