-
Takumi Shotoku authored
* Allow system tests using Rack::Test to run without Chrome If you require "action_dispatch/system_test_case", the driven_by method will be executed immediately. * https://github.com/rails/rails/blob/v6.0.0/actionpack/lib/action_dispatch/system_test_case.rb#L162 Then the preload method is called in SystemTesting::Driver#initialize. * https://github.com/rails/rails/blob/v6.0.0/actionpack/lib/action_dispatch/system_testing/driver.rb#L13 * https://github.com/rails/rails/blob/v6.0.0/actionpack/lib/action_dispatch/system_testing/browser.rb#L46-L63 Therefore, a "Webdrivers::BrowserNotFound" error occurs in the browser preloading when you run system tests witout Chrome. This commit avoid the error by lazy configuring the driver. ref: #37410 * Don't preload the browser with :rack_test If users specify `driven_by(:rack_test)`, it uses Chrome by default arguments. However, `Rack::Test` does not use a browser and does not need to be preloaded. Furthermore, it occurs `Webdrivers::BrowserNotFound` when run in a container (or a machine) without Chrome.
Takumi Shotoku authored* Allow system tests using Rack::Test to run without Chrome If you require "action_dispatch/system_test_case", the driven_by method will be executed immediately. * https://github.com/rails/rails/blob/v6.0.0/actionpack/lib/action_dispatch/system_test_case.rb#L162 Then the preload method is called in SystemTesting::Driver#initialize. * https://github.com/rails/rails/blob/v6.0.0/actionpack/lib/action_dispatch/system_testing/driver.rb#L13 * https://github.com/rails/rails/blob/v6.0.0/actionpack/lib/action_dispatch/system_testing/browser.rb#L46-L63 Therefore, a "Webdrivers::BrowserNotFound" error occurs in the browser preloading when you run system tests witout Chrome. This commit avoid the error by lazy configuring the driver. ref: #37410 * Don't preload the browser with :rack_test If users specify `driven_by(:rack_test)`, it uses Chrome by default arguments. However, `Rack::Test` does not use a browser and does not need to be preloaded. Furthermore, it occurs `Webdrivers::BrowserNotFound` when run in a container (or a machine) without Chrome.
Loading