aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/system_testing/driver_test.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-12-07 20:02:34 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-12-07 20:20:54 +0200
commit82b974813b28748e5affcff1d8c4ad60ab2971be (patch)
tree083dedbde855620fce7fa67c947c3129dff6439a /actionpack/test/dispatch/system_testing/driver_test.rb
parentbbacd60048a8efa1777a01292a9392e146a7d885 (diff)
downloadrails-82b974813b28748e5affcff1d8c4ad60ab2971be.tar.gz
rails-82b974813b28748e5affcff1d8c4ad60ab2971be.tar.bz2
rails-82b974813b28748e5affcff1d8c4ad60ab2971be.zip
Add headless firefox driver to System Tests
Diffstat (limited to 'actionpack/test/dispatch/system_testing/driver_test.rb')
-rw-r--r--actionpack/test/dispatch/system_testing/driver_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/system_testing/driver_test.rb b/actionpack/test/dispatch/system_testing/driver_test.rb
index 75feae6fe0..fcdaf7fb4c 100644
--- a/actionpack/test/dispatch/system_testing/driver_test.rb
+++ b/actionpack/test/dispatch/system_testing/driver_test.rb
@@ -25,6 +25,14 @@ class DriverTest < ActiveSupport::TestCase
assert_equal ({ url: "http://example.com/wd/hub" }), driver.instance_variable_get(:@options)
end
+ test "initializing the driver with a headless firefox" do
+ driver = ActionDispatch::SystemTesting::Driver.new(:selenium, using: :headless_firefox, screen_size: [1400, 1400], options: { url: "http://example.com/wd/hub" })
+ assert_equal :selenium, driver.instance_variable_get(:@name)
+ assert_equal :headless_firefox, driver.instance_variable_get(:@browser)
+ assert_equal [1400, 1400], driver.instance_variable_get(:@screen_size)
+ assert_equal ({ url: "http://example.com/wd/hub" }), driver.instance_variable_get(:@options)
+ end
+
test "initializing the driver with a poltergeist" do
driver = ActionDispatch::SystemTesting::Driver.new(:poltergeist, screen_size: [1400, 1400], options: { js_errors: false })
assert_equal :poltergeist, driver.instance_variable_get(:@name)