summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-08-11 23:33:49 +0300
committerrandx <dmitriy.zaporozhets@gmail.com>2012-08-11 23:33:49 +0300
commit28d903858e1ba491bcb75a5534db9eea1acdeaf0 (patch)
tree817ae1b830246c7b4eb3f8cdc759fd54ec4e4c9c
parentbb50917a296d198ff1ede52c0abe36009eaf6f3a (diff)
downloadgitlab-ce-28d903858e1ba491bcb75a5534db9eea1acdeaf0.tar.gz
Switch to capybara-webkit for Cucumber
-rw-r--r--.travis.yml1
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock4
-rw-r--r--features/support/env.rb11
4 files changed, 7 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index f3ede12f89f..53dc185709f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ env:
- DB=sqlite
before_install:
- sudo apt-get install libicu-dev -y
+ - sudo apt-get install libqt4-dev libqtwebkit-dev -y
- gem install charlock_holmes -v="0.6.8"
branches:
only:
diff --git a/Gemfile b/Gemfile
index aa0ef934efc..d2a5728f97c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -104,6 +104,7 @@ end
group :development, :test do
gem "rspec-rails"
gem "capybara"
+ gem "capybara-webkit"
gem "autotest"
gem "autotest-rails"
gem "pry"
diff --git a/Gemfile.lock b/Gemfile.lock
index e1680805a8b..7356c35ede0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -118,6 +118,9 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
+ capybara-webkit (0.12.1)
+ capybara (>= 1.0.0, < 1.2)
+ json
carrierwave (0.6.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
@@ -379,6 +382,7 @@ DEPENDENCIES
awesome_print
bootstrap-sass (= 2.0.3.1)
capybara
+ capybara-webkit
carrierwave
charlock_holmes
chosen-rails
diff --git a/features/support/env.rb b/features/support/env.rb
index 47253509262..498072a3d28 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -4,7 +4,6 @@
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
-require "selenium-webdriver"
require 'cucumber/rails'
require 'webmock/cucumber'
WebMock.allow_net_connect!
@@ -19,6 +18,7 @@ require Rails.root.join 'spec/support/valid_commit'
# prefer to use XPath just remove this line and adjust any selectors in your
# steps to use the XPath syntax.
Capybara.default_selector = :css
+Capybara.javascript_driver = :webkit
# By default, any exception happening in your Rails application will bubble up
# to Cucumber so that your scenario will fail. This is a different from how
@@ -64,12 +64,3 @@ end
# The :transaction strategy is faster, but might give you threading problems.
# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
Cucumber::Rails::Database.javascript_strategy = :truncation
-
-# We need this to fix the random timeout error that we were seeing in CI.
-Capybara.register_driver :selenium_with_long_timeout do |app|
- client = Selenium::WebDriver::Remote::Http::Default.new
- client.timeout = 120
- Capybara::Selenium::Driver.new(app, :browser => :firefox, :http_client => client)
-end
-
-Capybara.javascript_driver = :selenium_with_long_timeout