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 install -y \
nodejs \
qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x \
xvfb \
postgresql-client \
default-jre-headless \
unison \

View file

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

View file

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

View file

@ -18,6 +18,7 @@ Then(/^I click "(.+)" link within "(.+)" actions dropdown within Team members ta
end
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/)
parent = mail_td.first(:xpath, './/..')
expect(parent).to have_css('td', text: /\A#{role}\z/)

View file

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