Configure Capybara WebKit
This commit is contained in:
parent
61f29245e1
commit
22f0676419
|
@ -11,5 +11,8 @@ env:
|
||||||
- POSTGRES_PASSWORD=''
|
- POSTGRES_PASSWORD=''
|
||||||
- POSTGRES_DB=partynest_test
|
- POSTGRES_DB=partynest_test
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- apt install qt4-qmake libqt4-dev libqtwebkit-dev
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- psql -U postgres -c "CREATE DATABASE partynest_test;"
|
- psql -U postgres -c "CREATE DATABASE partynest_test;"
|
||||||
|
|
3
Gemfile
3
Gemfile
|
@ -153,4 +153,7 @@ group :test do
|
||||||
# When a Cucumber step fails, it is useful to create a screenshot image
|
# When a Cucumber step fails, it is useful to create a screenshot image
|
||||||
# and HTML file of the current page.
|
# and HTML file of the current page.
|
||||||
gem 'capybara-screenshot', '~> 1.0'
|
gem 'capybara-screenshot', '~> 1.0'
|
||||||
|
|
||||||
|
# Headless Webkit driver for Capybara.
|
||||||
|
gem 'capybara-webkit', '~> 1.15'
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,6 +83,9 @@ GEM
|
||||||
capybara-screenshot (1.0.22)
|
capybara-screenshot (1.0.22)
|
||||||
capybara (>= 1.0, < 4)
|
capybara (>= 1.0, < 4)
|
||||||
launchy
|
launchy
|
||||||
|
capybara-webkit (1.15.1)
|
||||||
|
capybara (>= 2.3, < 4.0)
|
||||||
|
json
|
||||||
coderay (1.1.2)
|
coderay (1.1.2)
|
||||||
concurrent-ruby (1.1.3)
|
concurrent-ruby (1.1.3)
|
||||||
coveralls (0.7.1)
|
coveralls (0.7.1)
|
||||||
|
@ -358,6 +361,7 @@ DEPENDENCIES
|
||||||
capistrano (~> 3.11)
|
capistrano (~> 3.11)
|
||||||
capistrano-rails (~> 1.4)
|
capistrano-rails (~> 1.4)
|
||||||
capybara-screenshot (~> 1.0)
|
capybara-screenshot (~> 1.0)
|
||||||
|
capybara-webkit (~> 1.15)
|
||||||
coveralls
|
coveralls
|
||||||
cucumber-rails (~> 1.6)
|
cucumber-rails (~> 1.6)
|
||||||
database_cleaner (~> 1.7)
|
database_cleaner (~> 1.7)
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
require 'cucumber/rails'
|
require 'cucumber/rails'
|
||||||
require 'capybara-screenshot/cucumber'
|
require 'capybara-screenshot/cucumber'
|
||||||
|
|
||||||
|
Capybara.default_driver = :webkit
|
||||||
|
Capybara.javascript_driver = :webkit
|
||||||
|
|
||||||
# Capybara defaults to CSS3 selectors rather than XPath.
|
# Capybara defaults to CSS3 selectors rather than XPath.
|
||||||
# If you'd prefer to use XPath, just uncomment this line and adjust any
|
# If you'd prefer to use XPath, just uncomment this line and adjust any
|
||||||
# selectors in your step definitions to use the XPath syntax.
|
# selectors in your step definitions to use the XPath syntax.
|
||||||
|
|
Reference in New Issue