Extract method to generate app host in tests
On JavaScript tests, Rails URL methods don't include the port when invoked from a test, but they do when invoked from the browser. This was causing some tests to fail with Selenium.
This commit is contained in:
@@ -34,7 +34,7 @@ end
|
||||
Capybara.register_driver :headless_chrome do |app|
|
||||
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
|
||||
"goog:chromeOptions" => {
|
||||
args: %W[headless no-sandbox window-size=1200,800 proxy-server=127.0.0.1:#{Capybara::Webmock.port_number}]
|
||||
args: %W[headless no-sandbox window-size=1200,800 proxy-server=#{Capybara.app_host}:#{Capybara::Webmock.port_number}]
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user