diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-06-02 13:30:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-02 13:30:59 -0400 |
commit | e935a6c0be7d7732d2459e84c77c40bd4932b42c (patch) | |
tree | ec562b86e5f56af3d2936b8c47cc75e70b664496 /actionpack/test | |
parent | f7388635f246b97a1aa0be54579339c6659fb865 (diff) | |
parent | 9063007538ffdfb03d35c7bb75218dfd2ddfc56c (diff) | |
download | rails-e935a6c0be7d7732d2459e84c77c40bd4932b42c.tar.gz rails-e935a6c0be7d7732d2459e84c77c40bd4932b42c.tar.bz2 rails-e935a6c0be7d7732d2459e84c77c40bd4932b42c.zip |
Merge pull request #29315 from mariochavez/driven_by_support_headless_drivers
SystemTesting::Driver can register capybara-webkit and poltergeist
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/system_testing/driver_test.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/system_testing/driver_test.rb b/actionpack/test/dispatch/system_testing/driver_test.rb index 814e1d707b..4a1b971da5 100644 --- a/actionpack/test/dispatch/system_testing/driver_test.rb +++ b/actionpack/test/dispatch/system_testing/driver_test.rb @@ -15,7 +15,21 @@ class DriverTest < ActiveSupport::TestCase assert_equal ({ url: "http://example.com/wd/hub" }), driver.instance_variable_get(:@options) end - test "selenium? returns false if driver is poltergeist" do - assert_not ActionDispatch::SystemTesting::Driver.new(:poltergeist).send(:selenium?) + 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) + assert_equal [1400, 1400], driver.instance_variable_get(:@screen_size) + assert_equal ({ js_errors: false }), driver.instance_variable_get(:@options) + end + + test "initializing the driver with a webkit" do + driver = ActionDispatch::SystemTesting::Driver.new(:webkit, screen_size: [1400, 1400], options: { skip_image_loading: true }) + assert_equal :webkit, driver.instance_variable_get(:@name) + assert_equal [1400, 1400], driver.instance_variable_get(:@screen_size) + assert_equal ({ skip_image_loading: true }), driver.instance_variable_get(:@options) + end + + test "rack_test? returns false if driver is poltergeist" do + assert_not ActionDispatch::SystemTesting::Driver.new(:poltergeist).send(:rack_test?) end end |