Replace capybara-webkit with apparition and update capybara to 3.30.0

See https://github.com/teamcapybara/capybara#apparition
This commit is contained in:
Lars Henrik Mai 2020-01-16 11:25:39 +01:00
parent 2050e1c46d
commit 5dad333655
5 changed files with 44 additions and 22 deletions

View file

@ -1,8 +1,13 @@
FROM ruby:2.5.7 FROM ruby:2.5.7
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - && apt-get update && \ RUN gem install bundler
# Add google package repository for google chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
RUN apt-get update && \
apt-get install -y build-essential zlib1g-dev libsqlite3-dev nodejs npm \ apt-get install -y build-essential zlib1g-dev libsqlite3-dev nodejs npm \
libxml2-dev libxslt1-dev pkg-config \ libxml2-dev libxslt1-dev pkg-config google-chrome-stable
libqtwebkit4 libqtwebkit-dev libqt4-dev xvfb
RUN mkdir -p /app RUN mkdir -p /app

View file

@ -68,7 +68,7 @@ group :test do
gem 'simplecov', require: false gem 'simplecov', require: false
gem 'database_cleaner' gem 'database_cleaner'
gem 'coveralls', require: false gem 'coveralls', require: false
gem 'capybara-webkit' gem 'apparition'
gem 'rails-controller-testing' gem 'rails-controller-testing'
end end

View file

@ -38,21 +38,22 @@ GEM
i18n (>= 0.7, < 2) i18n (>= 0.7, < 2)
minitest (~> 5.1) minitest (~> 5.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.5.2) addressable (2.7.0)
public_suffix (>= 2.0.2, < 4.0) public_suffix (>= 2.0.2, < 5.0)
apparition (0.4.0)
capybara (~> 3.13, < 4)
websocket-driver (>= 0.6.5)
arel (8.0.0) arel (8.0.0)
awesome_print (1.8.0) awesome_print (1.8.0)
builder (3.2.3) builder (3.2.3)
capybara (3.0.2) capybara (3.30.0)
addressable addressable
mini_mime (>= 0.1.3) mini_mime (>= 0.1.3)
nokogiri (~> 1.8) nokogiri (~> 1.8)
rack (>= 1.6.0) rack (>= 1.6.0)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
xpath (~> 3.0) regexp_parser (~> 1.5)
capybara-webkit (1.15.0) xpath (~> 3.2)
capybara (>= 2.3, < 4.0)
json
coderay (1.1.2) coderay (1.1.2)
coffee-rails (4.2.2) coffee-rails (4.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
@ -138,14 +139,14 @@ GEM
mime-types (3.1) mime-types (3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mini_mime (1.0.0) mini_mime (1.0.2)
mini_portile2 (2.3.0) mini_portile2 (2.4.0)
minitest (5.11.3) minitest (5.11.3)
multi_json (1.13.1) multi_json (1.13.1)
multipart-post (2.0.0) multipart-post (2.0.0)
nio4r (2.3.0) nio4r (2.3.0)
nokogiri (1.8.2) nokogiri (1.10.7)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.4.0)
omniauth (1.8.1) omniauth (1.8.1)
hashie (>= 3.4.6, < 3.6.0) hashie (>= 3.4.6, < 3.6.0)
rack (>= 1.6.2, < 3) rack (>= 1.6.2, < 3)
@ -158,10 +159,10 @@ GEM
method_source (~> 0.9.0) method_source (~> 0.9.0)
pry-rails (0.3.6) pry-rails (0.3.6)
pry (>= 0.10.4) pry (>= 0.10.4)
public_suffix (3.0.2) public_suffix (4.0.3)
puma (3.11.4) puma (3.11.4)
rack (2.0.4) rack (2.1.1)
rack-test (1.0.0) rack-test (1.1.0)
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
rails (5.1.6) rails (5.1.6)
actioncable (= 5.1.6) actioncable (= 5.1.6)
@ -195,6 +196,7 @@ GEM
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rake (12.3.1) rake (12.3.1)
rdoc (4.3.0) rdoc (4.3.0)
regexp_parser (1.6.0)
rest-client (1.6.7) rest-client (1.6.7)
mime-types (>= 1.16) mime-types (>= 1.16)
rspec-core (3.7.1) rspec-core (3.7.1)
@ -270,16 +272,16 @@ GEM
websocket-driver (0.6.5) websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3) websocket-extensions (0.1.3)
xpath (3.0.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
apparition
awesome_print awesome_print
capybara capybara
capybara-webkit
coffee-rails coffee-rails
coveralls coveralls
database_cleaner database_cleaner
@ -316,3 +318,6 @@ DEPENDENCIES
tzinfo-data tzinfo-data
uglifier uglifier
validate_url validate_url
BUNDLED WITH
2.1.4

View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
xvfb-run bundle exec rspec bundle exec rspec

View file

@ -1 +1,13 @@
Capybara.javascript_driver = :webkit require 'capybara/apparition'
Capybara.register_driver :apparition do |app|
Capybara::Apparition::Driver.new(
app,
headless: true,
browser_options: [ :no_sandbox, disable_features: 'VizDisplayCompositor']
)
end
Capybara.javascript_driver = :apparition
# https://github.com/teamcapybara/capybara#setup
Capybara.server = :puma, { Silent: true }