diff options
Diffstat (limited to 'test/application_system_test_case.rb')
| -rw-r--r-- | test/application_system_test_case.rb | 11 |
1 files changed, 10 insertions, 1 deletions
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! |
