Remove Capybara default_set_options for system tests using the Rack Test driver

The next warning is flooding the tests log:

`Options passed to Node#set but the RackTest driver
doesn't support any - ignoring`

As the rack test driver does not support any option, we
get rid of all `default_set_options` before each system
spec that uses this driver.
This commit is contained in:
Senén Rodero Rodríguez
2021-06-10 12:03:53 +02:00
parent 29ff9d4296
commit 7a33314ceb
2 changed files with 2 additions and 1 deletions

View File

@@ -47,7 +47,6 @@ end
Capybara.exact = true Capybara.exact = true
Capybara.enable_aria_label = true Capybara.enable_aria_label = true
Capybara.default_set_options = { clear: :backspace }
Capybara.disable_animation = true Capybara.disable_animation = true
OmniAuth.config.test_mode = true OmniAuth.config.test_mode = true

View File

@@ -54,10 +54,12 @@ RSpec.configure do |config|
config.before(:each, type: :system) do |example| config.before(:each, type: :system) do |example|
driven_by :headless_chrome driven_by :headless_chrome
Capybara.default_set_options = { clear: :backspace }
end end
config.before(:each, type: :system, no_js: true) do config.before(:each, type: :system, no_js: true) do
driven_by :rack_test driven_by :rack_test
Capybara.default_set_options = {}
end end
config.before(:each, type: :system) do config.before(:each, type: :system) do