diff --git a/Gemfile b/Gemfile index 0afebca97..a58648a1c 100644 --- a/Gemfile +++ b/Gemfile @@ -86,10 +86,6 @@ group :development do end group :development, :test do - gem 'capybara' - gem 'selenium-webdriver' - - # debug gem 'pry', '0.10.1' gem 'bullet', '4.14.7' # for finding database optimizations @@ -100,7 +96,9 @@ group :development, :test do end group :test do + gem 'capybara' gem 'database_cleaner' gem 'simplecov', require: false + gem 'webdrivers' gem 'webmock' end diff --git a/Gemfile.lock b/Gemfile.lock index 8c140d0f0..cc822dab7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,8 +94,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) airbrake (9.4.3) airbrake-ruby (~> 4.6) airbrake-ruby (4.6.0) @@ -123,7 +123,7 @@ GEM activesupport (>= 3.0.0) uniform_notifier (~> 1.9.0) cancancan (3.0.1) - capybara (3.22.0) + capybara (3.29.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -131,8 +131,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) + childprocess (3.0.0) chronic (0.10.2) coderay (1.1.0) coercible (1.0.0) @@ -168,7 +167,7 @@ GEM responders warden (~> 1.2.3) diff-lcs (1.3) - docile (1.3.1) + docile (1.3.2) domain_name (0.5.20170404) unf (>= 0.0.5, < 1.0.0) equalizer (0.0.11) @@ -245,6 +244,7 @@ GEM mustermann-grape (1.0.0) mustermann (~> 1.0.0) netrc (0.11.0) + nio4r (2.5.2) nokogiri (1.10.4) mini_portile2 (~> 2.4.0) nori (2.6.0) @@ -260,8 +260,9 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - public_suffix (3.1.0) - puma (3.12.1) + public_suffix (4.0.1) + puma (4.2.1) + nio4r (~> 2.0) que (0.10.0) que-web (0.4.0) erubis @@ -309,7 +310,7 @@ GEM i18n rbtree3 (0.5.0) rdoc (4.3.0) - regexp_parser (1.5.1) + regexp_parser (1.6.0) request_store (1.4.1) rack (>= 1.4) responders (2.4.1) @@ -332,7 +333,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.6.0) rspec-support (3.6.0) - rubyzip (1.3.0) + rubyzip (2.0.0) safe_yaml (1.0.5) sass (3.4.23) sass-rails (5.0.6) @@ -358,10 +359,10 @@ GEM select2-rails (3.5.9.3) thor (~> 0.14) selectize-rails (0.12.1) - selenium-webdriver (3.13.0) - childprocess (~> 0.5) - rubyzip (~> 1.2) - simplecov (0.16.1) + selenium-webdriver (3.142.6) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) + simplecov (0.17.1) docile (~> 1.1) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) @@ -406,6 +407,10 @@ GEM wasabi (3.5.0) httpi (~> 2.0) nokogiri (>= 1.4.2) + webdrivers (4.1.3) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (>= 3.0, < 4.0) webmock (3.6.0) addressable (>= 2.3.6) crack (>= 0.3.2) @@ -467,12 +472,12 @@ DEPENDENCIES sdoc (= 0.4.1) select2-rails (= 3.5.9.3) selectize-rails (= 0.12.1) - selenium-webdriver simplecov simpleidn (= 0.0.7) uglifier uuidtools (= 2.1.5) validates_email_format_of (= 1.6.3) + webdrivers webmock whenever (= 0.9.4) diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index ea3b6dff5..036ecd382 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -20,7 +20,7 @@ class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase self.use_transactional_fixtures = false DatabaseCleaner.strategy = :truncation - Capybara.register_driver(:chrome) do |_app| + Capybara.register_driver(:chrome) do |app| options = ::Selenium::WebDriver::Chrome::Options.new options.add_argument('--headless') @@ -28,13 +28,10 @@ class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase options.add_argument('--disable-dev-shm-usage') options.add_argument('--window-size=1400,1400') - Capybara::Selenium::Driver.new(Rails.application, browser: :chrome, options: options) + Capybara::Selenium::Driver.new(app, browser: :chrome, options: options) end - Capybara.register_server(:silent_puma) do |app, port, _host| - require 'rack/handler/puma' - Rack::Handler::Puma.run(app, Port: port, Threads: '0:2', Silent: true) - end + Capybara.server = :puma, { Silent: true } def setup DatabaseCleaner.start @@ -42,7 +39,6 @@ class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase super Capybara.current_driver = :chrome - Capybara.server = :silent_puma end def teardown