Skip to content

Commit 1c2c42b

Browse files
committed
Add back animations disabling
1 parent 6a1d24b commit 1c2c42b

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

spec/features/shared/examples.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,10 @@
4343
shared_examples "Validation errors displaying" do
4444
context "when the new comment is submitted with blank fields", blank_form_submitted: true do
4545
scenario "validation errors displayed" do
46-
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
47-
puts "examples.rb: #{__LINE__}, method: #{__method__}"
48-
# puts "triggering sleep 1"
49-
puts "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
50-
# # sleep 1
51-
# # puts "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
52-
# puts "After sleep 1"
53-
# puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
46+
# Sleeping is CRITICAL to this test not crashing on Travis
47+
# See builds here:
48+
# https://travis-ci.org/shakacode/react-webpack-rails-tutorial/builds/178794772
49+
# sleep 1
5450

5551
expect(page).to have_content("Your comment was not saved!")
5652
expect(page).to have_content("Author: can't be blank")

spec/rails_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
# Maybe selenium_firefox webdriver only works for Travis-CI builds.
4242
# 2016-03-06: Phantomjs, all options fails on MacOs
4343
# Same for webkit
44-
default_driver = :poltergeist # :selenium_chrome
44+
# default_driver = :poltergeist
45+
default_driver = :poltergeist_no_animations # :selenium_chrome
4546

4647
supported_drivers = %i( poltergeist poltergeist_errors_ok
4748
poltergeist_no_animations webkit
@@ -56,6 +57,7 @@
5657
when :poltergeist, :poltergeist_errors_ok, :poltergeist_no_animations
5758
require "capybara/poltergeist"
5859
opts = {
60+
# Leaving animations off, as a sleep was still needed.
5961
extensions: ["#{Rails.root}/spec/support/phantomjs-disable-animations.js"],
6062
window_size: [1280, 720],
6163
screen_size: [1600, 1200]

spec/support/phantomjs-disable-animations.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// https://gist.github.com/andyjbas/9962218
22
// disable_animations.js
3+
4+
// No idea which of these is more helpful.
5+
// They both resulted in crashes:
6+
// https://travis-ci.org/shakacode/react-webpack-rails-tutorial/builds/178794772
37
// var disableAnimationStyles = '-webkit-transition: none !important;' +
48
// '-moz-transition: none !important;' +
59
// '-ms-transition: none !important;' +

0 commit comments

Comments
 (0)