Skip to content

Commit b7e6195

Browse files
zzakhahmed
andcommitted
Enable remote chrome selenium tests for actiontext
Blocks: rails/buildkite-config#33 Previous works: rails#47030, rails#47127 Co-authored-by: Haroon Ahmed <[email protected]>
1 parent 7f7f9df commit b7e6195

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

actiontext/test/application_system_test_case.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
require "test_helper"
44

55
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
6-
driven_by :selenium, using: :headless_chrome
6+
options = {
7+
browser: ENV["SELENIUM_DRIVER_URL"].blank? ? :chrome : :remote,
8+
url: ENV["SELENIUM_DRIVER_URL"].blank? ? nil : ENV["SELENIUM_DRIVER_URL"]
9+
}
10+
driven_by :selenium, using: :headless_chrome, options: options
711
end
812

913
Capybara.server = :puma, { Silent: true }
14+
Capybara.server_host = "0.0.0.0" # bind to all interfaces
15+
Capybara.app_host = "http://#{IPSocket.getaddress(Socket.gethostname)}" if ENV["SELENIUM_DRIVER_URL"].present?

0 commit comments

Comments
 (0)