From f77e0d273f754bdd78244898ad410c1a2ed068c6 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sat, 10 Aug 2024 23:19:47 +0200 Subject: Upgraded to rails 7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- test/application_system_test_case.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test/application_system_test_case.rb') diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 5fd0889..a84f040 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -3,7 +3,16 @@ require 'test_helper' class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400] + if ENV['CAPYBARA_SERVER_PORT'] + served_by host: 'rails-app', port: ENV['CAPYBARA_SERVER_PORT'] + + driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400], options: { + browser: :remote, + url: "http://#{ENV.fetch('SELENIUM_HOST', nil)}:4444" + } + else + driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400] + end # Sign in with the default user. def sign_in! -- cgit v1.2.3