diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-11-06 13:11:04 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-11-06 13:15:34 +0900 |
commit | 8847e608b9a0f7a3f8d65832e1815b4ab1f021f3 (patch) | |
tree | 1f3a5ab3f156f389c7c07da6f90975c933e17044 /actionpack/lib/action_dispatch | |
parent | 8a2ee3d8c6921ce34e597658e3f2b43b41423d1d (diff) | |
download | rails-8847e608b9a0f7a3f8d65832e1815b4ab1f021f3.tar.gz rails-8847e608b9a0f7a3f8d65832e1815b4ab1f021f3.tar.bz2 rails-8847e608b9a0f7a3f8d65832e1815b4ab1f021f3.zip |
Explicitly pass window handle to `resize_window_to`
Unlike `resize_window`, `resize_window_to` has three arguments.
https://github.com/thoughtbot/capybara-webkit/blob/d63c3c8e3ae844f0c59359532a6dcb50f4a64d0a/lib/capybara/webkit/driver.rb#L135-L143
Therefore, if pass only width and height just like `resize_window`,
`ArgumentError`will be raised.
To prevent this, explicitly pass window handler.
Follow up of #31046
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/driver.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/driver.rb b/actionpack/lib/action_dispatch/system_testing/driver.rb index 7577d3e68a..2687772b4b 100644 --- a/actionpack/lib/action_dispatch/system_testing/driver.rb +++ b/actionpack/lib/action_dispatch/system_testing/driver.rb @@ -59,7 +59,7 @@ module ActionDispatch def register_webkit(app) Capybara::Webkit::Driver.new(app, Capybara::Webkit::Configuration.to_hash.merge(@options)).tap do |driver| - driver.resize_window_to(*@screen_size) + driver.resize_window_to(driver.current_window_handle, *@screen_size) end end |