Switch to PhantomJS from Selenium
This improves test performance and eliminates interaction with any/all windowing systems. You need PhantomJS installed, but hey.master
parent
cb3dbf264e
commit
c2eefa23c7
|
@ -5,8 +5,6 @@ rvm:
|
||||||
addons:
|
addons:
|
||||||
postgresql: "9.4"
|
postgresql: "9.4"
|
||||||
before_script:
|
before_script:
|
||||||
- export DISPLAY=:99.0
|
|
||||||
- sh -e /etc/init.d/xvfb start
|
|
||||||
- psql -c 'create database factorio_mods_test;' -U postgres
|
- psql -c 'create database factorio_mods_test;' -U postgres
|
||||||
- cp config/database.yml.travis config/database.yml
|
- cp config/database.yml.travis config/database.yml
|
||||||
- bundle exec rake db:schema:load db:seed
|
- bundle exec rake db:schema:load db:seed
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -26,7 +26,7 @@ group :development, :test, :assets do
|
||||||
gem 'coffee-rails', '~> 4.0.0' # Use CoffeeScript for .js.coffee assets and views
|
gem 'coffee-rails', '~> 4.0.0' # Use CoffeeScript for .js.coffee assets and views
|
||||||
gem 'jquery-rails' # Use jquery as the JavaScript library
|
gem 'jquery-rails' # Use jquery as the JavaScript library
|
||||||
gem 'turbolinks' # Turbolinks makes following links in your web application faster
|
gem 'turbolinks' # Turbolinks makes following links in your web application faster
|
||||||
gem 'selenium-webdriver'
|
gem 'poltergeist'
|
||||||
gem 'database_cleaner'
|
gem 'database_cleaner'
|
||||||
gem 'bourbon', '~> 4.2'
|
gem 'bourbon', '~> 4.2'
|
||||||
gem 'nprogress-rails'
|
gem 'nprogress-rails'
|
||||||
|
|
20
Gemfile.lock
20
Gemfile.lock
|
@ -73,11 +73,10 @@ GEM
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (>= 0.5.4)
|
rack-test (>= 0.5.4)
|
||||||
xpath (~> 2.0)
|
xpath (~> 2.0)
|
||||||
childprocess (0.5.6)
|
|
||||||
ffi (~> 1.0, >= 1.0.11)
|
|
||||||
chunky_png (1.3.4)
|
chunky_png (1.3.4)
|
||||||
climate_control (0.0.3)
|
climate_control (0.0.3)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
|
cliver (0.3.2)
|
||||||
cocaine (0.5.7)
|
cocaine (0.5.7)
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
cocoon (1.2.6)
|
cocoon (1.2.6)
|
||||||
|
@ -214,6 +213,11 @@ GEM
|
||||||
mime-types
|
mime-types
|
||||||
mimemagic (= 0.3.0)
|
mimemagic (= 0.3.0)
|
||||||
pg (0.18.2)
|
pg (0.18.2)
|
||||||
|
poltergeist (1.6.0)
|
||||||
|
capybara (~> 2.1)
|
||||||
|
cliver (~> 0.3.1)
|
||||||
|
multi_json (~> 1.0)
|
||||||
|
websocket-driver (>= 0.2.0)
|
||||||
polyamorous (1.2.0)
|
polyamorous (1.2.0)
|
||||||
activerecord (>= 3.0)
|
activerecord (>= 3.0)
|
||||||
pry (0.10.1)
|
pry (0.10.1)
|
||||||
|
@ -288,7 +292,6 @@ GEM
|
||||||
rspec-support (3.3.0)
|
rspec-support (3.3.0)
|
||||||
ruby_parser (3.7.0)
|
ruby_parser (3.7.0)
|
||||||
sexp_processor (~> 4.1)
|
sexp_processor (~> 4.1)
|
||||||
rubyzip (1.1.7)
|
|
||||||
safe_yaml (1.0.4)
|
safe_yaml (1.0.4)
|
||||||
sass (3.4.16)
|
sass (3.4.16)
|
||||||
sass-rails (5.0.3)
|
sass-rails (5.0.3)
|
||||||
|
@ -299,11 +302,6 @@ GEM
|
||||||
tilt (~> 1.1)
|
tilt (~> 1.1)
|
||||||
sassy-maps (0.4.0)
|
sassy-maps (0.4.0)
|
||||||
sass (~> 3.3)
|
sass (~> 3.3)
|
||||||
selenium-webdriver (2.46.2)
|
|
||||||
childprocess (~> 0.5)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
rubyzip (~> 1.0)
|
|
||||||
websocket (~> 1.0)
|
|
||||||
sexp_processor (4.6.0)
|
sexp_processor (4.6.0)
|
||||||
shellany (0.0.1)
|
shellany (0.0.1)
|
||||||
slop (3.6.0)
|
slop (3.6.0)
|
||||||
|
@ -343,7 +341,9 @@ GEM
|
||||||
webmock (1.21.0)
|
webmock (1.21.0)
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.3.6)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
websocket (1.2.2)
|
websocket-driver (0.6.2)
|
||||||
|
websocket-extensions (>= 0.1.0)
|
||||||
|
websocket-extensions (0.1.2)
|
||||||
xpath (2.0.0)
|
xpath (2.0.0)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
|
|
||||||
|
@ -376,6 +376,7 @@ DEPENDENCIES
|
||||||
nprogress-rails
|
nprogress-rails
|
||||||
paperclip
|
paperclip
|
||||||
pg
|
pg
|
||||||
|
poltergeist
|
||||||
rack-livereload
|
rack-livereload
|
||||||
rack-zippy
|
rack-zippy
|
||||||
rails (~> 4.1.12)
|
rails (~> 4.1.12)
|
||||||
|
@ -387,7 +388,6 @@ DEPENDENCIES
|
||||||
rspec-rails
|
rspec-rails
|
||||||
sass (~> 3.4.0)
|
sass (~> 3.4.0)
|
||||||
sass-rails
|
sass-rails
|
||||||
selenium-webdriver
|
|
||||||
spring
|
spring
|
||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
susy (~> 2.0)
|
susy (~> 2.0)
|
||||||
|
|
|
@ -4,6 +4,7 @@ require 'spec_helper'
|
||||||
require File.expand_path("../../config/environment", __FILE__)
|
require File.expand_path("../../config/environment", __FILE__)
|
||||||
require 'rspec/rails'
|
require 'rspec/rails'
|
||||||
require 'capybara/rspec'
|
require 'capybara/rspec'
|
||||||
|
require 'capybara/poltergeist'
|
||||||
require 'webmock/rspec'
|
require 'webmock/rspec'
|
||||||
require 'vcr'
|
require 'vcr'
|
||||||
require 'paperclip/matchers'
|
require 'paperclip/matchers'
|
||||||
|
@ -11,6 +12,7 @@ require 'rspec/its'
|
||||||
|
|
||||||
WebMock.disable_net_connect!(allow_localhost: true)
|
WebMock.disable_net_connect!(allow_localhost: true)
|
||||||
# Capybara.default_driver = :selenium_phantomjs
|
# Capybara.default_driver = :selenium_phantomjs
|
||||||
|
Capybara.javascript_driver = :poltergeist
|
||||||
|
|
||||||
# Requires supporting ruby files with custom matchers and macros, etc, in
|
# Requires supporting ruby files with custom matchers and macros, etc, in
|
||||||
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
||||||
|
|
Loading…
Reference in New Issue