From 917d02a4e581192764c29c35acbcd22af54664cf Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Wed, 2 Oct 2019 00:24:01 -0700 Subject: [PATCH] Update capybara --- Gemfile | 1 - Gemfile.lock | 6 ------ spec/support/capybara.rb | 27 +++++++++++++-------------- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 68e9ae3..2eb0500 100644 --- a/Gemfile +++ b/Gemfile @@ -60,7 +60,6 @@ end group :test, :staging do gem 'capybara' gem 'database_cleaner' - gem "poltergeist" gem 'launchy' gem 'selenium-webdriver' gem 'simplecov', :require => false diff --git a/Gemfile.lock b/Gemfile.lock index a7f8ae5..d1daa7f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -103,7 +103,6 @@ GEM chartkick (3.0.2) childprocess (0.9.0) ffi (~> 1.0, >= 1.0.11) - cliver (0.3.2) coderay (1.1.2) coffee-rails (4.2.2) coffee-script (>= 2.2.0) @@ -257,10 +256,6 @@ GEM parser (2.6.0.0) ast (~> 2.4.0) pg (1.1.4) - poltergeist (1.18.1) - capybara (>= 2.1, < 4) - cliver (~> 0.3.1) - websocket-driver (>= 0.2.0) powerpack (0.1.2) pry (0.12.2) coderay (~> 1.1.0) @@ -470,7 +465,6 @@ DEPENDENCIES launchy parallel_tests pg - poltergeist pry-rails pry-rescue puma diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index 056d14d..34838f8 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -1,16 +1,15 @@ -require 'capybara/poltergeist' +Capybara.server = :puma # Until your setup is working +# Capybara.server = :puma, { Silent: true } # To clean up your test output +#asset_hosts = { +# staging: 'http://13staging.owlephant.icu', +# development: 'http://localhost:3000', +# test: 'http://localhost:3000' +#} -asset_hosts = { - staging: 'http://staging.tienlen.ga', - development: 'http://localhost:3000', - test: 'http://localhost:3000' -} +#if ENV['RAILS_ENV'] == 'staging' +# #Capybara.run_server = false +# Capybara.app_host = asset_hosts[ENV['RAILS_ENV'].to_sym] +#end +#Capybara.asset_host = asset_hosts[ENV['RAILS_ENV'].to_sym] -if ENV['RAILS_ENV'] == 'staging' - #Capybara.run_server = false - Capybara.app_host = asset_hosts[ENV['RAILS_ENV'].to_sym] -end -Capybara.asset_host = asset_hosts[ENV['RAILS_ENV'].to_sym] - -Capybara.javascript_driver = :poltergeist -#Capybara.javascript_driver = :selenium +Capybara.javascript_driver = :selenium_chrome_headless