From 8847e608b9a0f7a3f8d65832e1815b4ab1f021f3 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Mon, 6 Nov 2017 13:11:04 +0900 Subject: 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 --- actionpack/lib/action_dispatch/system_testing/driver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch') 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 -- cgit v1.2.3