Commit 28d903858e1ba491bcb75a5534db9eea1acdeaf0
1 parent
bb50917a
Exists in
master
and in
4 other branches
Switch to capybara-webkit for Cucumber
Showing
4 changed files
with
7 additions
and
10 deletions
Show diff stats
.travis.yml
Gemfile
Gemfile.lock
| ... | ... | @@ -118,6 +118,9 @@ GEM |
| 118 | 118 | rack-test (>= 0.5.4) |
| 119 | 119 | selenium-webdriver (~> 2.0) |
| 120 | 120 | xpath (~> 0.1.4) |
| 121 | + capybara-webkit (0.12.1) | |
| 122 | + capybara (>= 1.0.0, < 1.2) | |
| 123 | + json | |
| 121 | 124 | carrierwave (0.6.2) |
| 122 | 125 | activemodel (>= 3.2.0) |
| 123 | 126 | activesupport (>= 3.2.0) |
| ... | ... | @@ -379,6 +382,7 @@ DEPENDENCIES |
| 379 | 382 | awesome_print |
| 380 | 383 | bootstrap-sass (= 2.0.3.1) |
| 381 | 384 | capybara |
| 385 | + capybara-webkit | |
| 382 | 386 | carrierwave |
| 383 | 387 | charlock_holmes |
| 384 | 388 | chosen-rails | ... | ... |
features/support/env.rb
| ... | ... | @@ -4,7 +4,6 @@ |
| 4 | 4 | # instead of editing this one. Cucumber will automatically load all features/**/*.rb |
| 5 | 5 | # files. |
| 6 | 6 | |
| 7 | -require "selenium-webdriver" | |
| 8 | 7 | require 'cucumber/rails' |
| 9 | 8 | require 'webmock/cucumber' |
| 10 | 9 | WebMock.allow_net_connect! |
| ... | ... | @@ -19,6 +18,7 @@ require Rails.root.join 'spec/support/valid_commit' |
| 19 | 18 | # prefer to use XPath just remove this line and adjust any selectors in your |
| 20 | 19 | # steps to use the XPath syntax. |
| 21 | 20 | Capybara.default_selector = :css |
| 21 | +Capybara.javascript_driver = :webkit | |
| 22 | 22 | |
| 23 | 23 | # By default, any exception happening in your Rails application will bubble up |
| 24 | 24 | # to Cucumber so that your scenario will fail. This is a different from how |
| ... | ... | @@ -64,12 +64,3 @@ end |
| 64 | 64 | # The :transaction strategy is faster, but might give you threading problems. |
| 65 | 65 | # See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature |
| 66 | 66 | Cucumber::Rails::Database.javascript_strategy = :truncation |
| 67 | - | |
| 68 | -# We need this to fix the random timeout error that we were seeing in CI. | |
| 69 | -Capybara.register_driver :selenium_with_long_timeout do |app| | |
| 70 | - client = Selenium::WebDriver::Remote::Http::Default.new | |
| 71 | - client.timeout = 120 | |
| 72 | - Capybara::Selenium::Driver.new(app, :browser => :firefox, :http_client => client) | |
| 73 | -end | |
| 74 | - | |
| 75 | -Capybara.javascript_driver = :selenium_with_long_timeout | ... | ... |