aboutsummaryrefslogtreecommitdiff
path: root/test/application_system_test_case.rb
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-08-10 23:19:47 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-08-10 23:19:47 +0200
commitf77e0d273f754bdd78244898ad410c1a2ed068c6 (patch)
tree92d2f9ac25008081729ab8e7ec749a0473d2c907 /test/application_system_test_case.rb
parent24c857c08ac207f3b2814df9314fd3c9a7687c1a (diff)
downloadoperum-f77e0d273f754bdd78244898ad410c1a2ed068c6.tar.gz
operum-f77e0d273f754bdd78244898ad410c1a2ed068c6.zip
Upgraded to rails 7.2
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'test/application_system_test_case.rb')
-rw-r--r--test/application_system_test_case.rb11
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!