From 22f067641996d56ec8e77b0ed6a0b3da5f03cde9 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sat, 1 Dec 2018 04:41:15 +0500 Subject: [PATCH] Configure Capybara WebKit --- .travis.yml | 3 +++ Gemfile | 3 +++ Gemfile.lock | 4 ++++ features/support/env.rb | 3 +++ 4 files changed, 13 insertions(+) diff --git a/.travis.yml b/.travis.yml index 55e9291..dbf6aec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,8 @@ env: - POSTGRES_PASSWORD='' - POSTGRES_DB=partynest_test +before_install: + - apt install qt4-qmake libqt4-dev libqtwebkit-dev + before_script: - psql -U postgres -c "CREATE DATABASE partynest_test;" diff --git a/Gemfile b/Gemfile index 0e9797a..19a57b3 100644 --- a/Gemfile +++ b/Gemfile @@ -153,4 +153,7 @@ group :test do # When a Cucumber step fails, it is useful to create a screenshot image # and HTML file of the current page. gem 'capybara-screenshot', '~> 1.0' + + # Headless Webkit driver for Capybara. + gem 'capybara-webkit', '~> 1.15' end diff --git a/Gemfile.lock b/Gemfile.lock index e7380df..625ecc2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,6 +83,9 @@ GEM capybara-screenshot (1.0.22) capybara (>= 1.0, < 4) launchy + capybara-webkit (1.15.1) + capybara (>= 2.3, < 4.0) + json coderay (1.1.2) concurrent-ruby (1.1.3) coveralls (0.7.1) @@ -358,6 +361,7 @@ DEPENDENCIES capistrano (~> 3.11) capistrano-rails (~> 1.4) capybara-screenshot (~> 1.0) + capybara-webkit (~> 1.15) coveralls cucumber-rails (~> 1.6) database_cleaner (~> 1.7) diff --git a/features/support/env.rb b/features/support/env.rb index 9479b83..5845fa3 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -7,6 +7,9 @@ require 'cucumber/rails' require 'capybara-screenshot/cucumber' +Capybara.default_driver = :webkit +Capybara.javascript_driver = :webkit + # Capybara defaults to CSS3 selectors rather than XPath. # If you'd prefer to use XPath, just uncomment this line and adjust any # selectors in your step definitions to use the XPath syntax.