change drivers for browser

This commit is contained in:
mlorb 2017-11-06 14:26:01 +01:00
parent bd569b9746
commit 1c3c822796
5 changed files with 25 additions and 38 deletions

View file

@ -6,8 +6,6 @@ RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get update -qq && \ apt-get update -qq && \
apt-get install -y \ apt-get install -y \
nodejs \ nodejs \
qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x \
xvfb \
postgresql-client \ postgresql-client \
default-jre-headless \ default-jre-headless \
unison \ unison \

View file

@ -108,9 +108,8 @@ group :test do
gem 'cucumber-rails', '~> 1.5' gem 'cucumber-rails', '~> 1.5'
gem 'database_cleaner' gem 'database_cleaner'
gem 'capybara' gem 'capybara'
gem 'headless' gem 'poltergeist'
gem 'capybara-webkit', '~> 1.14' gem 'phantomjs', :require => 'phantomjs/poltergeist'
gem 'selenium-webdriver'
gem 'simplecov', require: false gem 'simplecov', require: false
end end

View file

@ -137,12 +137,8 @@ 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)
capybara-webkit (1.14.0)
capybara (>= 2.3.0, < 2.14.0)
json
childprocess (0.8.0)
ffi (~> 1.0, >= 1.0.11)
climate_control (0.2.0) climate_control (0.2.0)
cliver (0.3.2)
cocaine (0.5.8) cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0) climate_control (>= 0.0.3, < 1.0)
coderay (1.1.2) coderay (1.1.2)
@ -223,7 +219,6 @@ GEM
globalid (0.4.0) globalid (0.4.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
hammerjs-rails (2.0.8) hammerjs-rails (2.0.8)
headless (2.3.1)
httparty (0.15.6) httparty (0.15.6)
multi_xml (>= 0.5.2) multi_xml (>= 0.5.2)
i18n (0.9.0) i18n (0.9.0)
@ -307,6 +302,11 @@ GEM
parser (2.4.0.0) parser (2.4.0.0)
ast (~> 2.2) ast (~> 2.2)
pg (0.21.0) pg (0.21.0)
phantomjs (2.1.1.0)
poltergeist (1.16.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
polyglot (0.3.5) polyglot (0.3.5)
powerpack (0.1.1) powerpack (0.1.1)
pry (0.11.2) pry (0.11.2)
@ -421,9 +421,6 @@ GEM
sdoc (0.4.2) sdoc (0.4.2)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0) rdoc (~> 4.0)
selenium-webdriver (3.6.0)
childprocess (~> 0.5)
rubyzip (~> 1.0)
shoulda-matchers (3.1.2) shoulda-matchers (3.1.2)
activesupport (>= 4.0.0) activesupport (>= 4.0.0)
silencer (1.0.1) silencer (1.0.1)
@ -509,7 +506,6 @@ DEPENDENCIES
bullet bullet
byebug byebug
capybara capybara
capybara-webkit (~> 1.14)
commit_param_routing commit_param_routing
creek creek
cucumber-rails (~> 1.5) cucumber-rails (~> 1.5)
@ -526,7 +522,6 @@ DEPENDENCIES
figaro figaro
font-awesome-rails (~> 4.7.0.2) font-awesome-rails (~> 4.7.0.2)
hammerjs-rails hammerjs-rails
headless
i18n-js (>= 3.0.0.rc11) i18n-js (>= 3.0.0.rc11)
introjs-rails introjs-rails
jbuilder jbuilder
@ -544,6 +539,8 @@ DEPENDENCIES
nokogiri nokogiri
paperclip (~> 5.1) paperclip (~> 5.1)
pg pg
phantomjs
poltergeist
pry pry
pry-byebug pry-byebug
pry-rails pry-rails
@ -564,7 +561,6 @@ DEPENDENCIES
sass-rails (~> 5.0.6) sass-rails (~> 5.0.6)
scss_lint scss_lint
sdoc (~> 0.4.0) sdoc (~> 0.4.0)
selenium-webdriver
shoulda-matchers shoulda-matchers
silencer silencer
simple_token_authentication (~> 1.15.1) simple_token_authentication (~> 1.15.1)

View file

@ -18,6 +18,7 @@ Then(/^I click "(.+)" link within "(.+)" actions dropdown within Team members ta
end end
Then(/^I should see "(.+)" in Role column of "(.+)" within Team members table$/) do |role, email| Then(/^I should see "(.+)" in Role column of "(.+)" within Team members table$/) do |role, email|
wait_for_ajax
mail_td = find('td', text: /\A#{email}\z/) mail_td = find('td', text: /\A#{email}\z/)
parent = mail_td.first(:xpath, './/..') parent = mail_td.first(:xpath, './/..')
expect(parent).to have_css('td', text: /\A#{role}\z/) expect(parent).to have_css('td', text: /\A#{role}\z/)

View file

@ -7,31 +7,24 @@ ENV['CUCUMBER'] = 'cucumber'
require 'cucumber/rails' require 'cucumber/rails'
require 'capybara/cucumber' require 'capybara/cucumber'
require 'capybara-webkit'
require 'simplecov' require 'simplecov'
require 'headless' require 'capybara/poltergeist'
require 'phantomjs'
headless = Headless.new Capybara.register_driver :poltergeist do |app|
headless.start options = {
# inspector: true,
Capybara::Webkit.configure do |config| screen_size: [1600, 1200],
# Enable debug mode. Prints a log of everything the driver is doing. js_errors: false,
config.debug = false phantomjs: Phantomjs.path,
phantomjs_options: [
# Allow pages to make requests to any URL without issuing a warning. '--ignore-ssl-errors=yes'
config.allow_unknown_urls ]
}
# Timeout if requests take longer than 30 seconds Capybara::Poltergeist::Driver.new(app, options)
config.timeout = 30
# Don't raise errors when SSL certificates can't be validated
config.ignore_ssl_errors
# Raise JavaScript errors as exceptions
config.raise_javascript_errors = false
end end
Capybara.javascript_driver = :webkit Capybara.javascript_driver = :poltergeist
Capybara.default_max_wait_time = 30 Capybara.default_max_wait_time = 30
Capybara.asset_host = 'http://localhost:3001' Capybara.asset_host = 'http://localhost:3001'
Capybara.server_port = 3001 Capybara.server_port = 3001