aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/system_testing/driver_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/system_testing/driver_test.rb')
-rw-r--r--actionpack/test/dispatch/system_testing/driver_test.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/system_testing/driver_test.rb b/actionpack/test/dispatch/system_testing/driver_test.rb
index 0d08f17af3..d3b16d0328 100644
--- a/actionpack/test/dispatch/system_testing/driver_test.rb
+++ b/actionpack/test/dispatch/system_testing/driver_test.rb
@@ -66,7 +66,7 @@ class DriverTest < ActiveSupport::TestCase
end
driver.use
- expected = { args: ["start-maximized"], mobileEmulation: { deviceName: "iphone 6" }, prefs: { detach: true } }
+ expected = { "goog:chromeOptions" => { args: ["start-maximized"], mobileEmulation: { deviceName: "iphone 6" }, prefs: { detach: true } } }
assert_equal expected, driver_option.as_json
end
@@ -81,7 +81,7 @@ class DriverTest < ActiveSupport::TestCase
end
driver.use
- expected = { args: ["start-maximized"], mobileEmulation: { deviceName: "iphone 6" }, prefs: { detach: true } }
+ expected = { "goog:chromeOptions" => { args: ["start-maximized"], mobileEmulation: { deviceName: "iphone 6" }, prefs: { detach: true } } }
assert_equal expected, driver_option.as_json
end
@@ -120,4 +120,17 @@ class DriverTest < ActiveSupport::TestCase
driver.use
end
end
+
+ test "preloads browser's driver_path" do
+ called = false
+
+ original_driver_path = ::Selenium::WebDriver::Chrome::Service.driver_path
+ ::Selenium::WebDriver::Chrome::Service.driver_path = -> { called = true }
+
+ ActionDispatch::SystemTesting::Driver.new(:selenium, screen_size: [1400, 1400], using: :chrome)
+
+ assert called
+ ensure
+ ::Selenium::WebDriver::Chrome::Service.driver_path = original_driver_path
+ end
end