Skip to content

Commit ec5ec51

Browse files
committed
Popup can be nil
1 parent c9e4dff commit ec5ec51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/browser_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,11 @@ module Ferrum
441441
JS
442442

443443
popup1, popup2 = browser.windows(:last, 2)
444-
popup1.resize(width: 100, height: 200)
445-
popup2.resize(width: 200, height: 100)
444+
popup1&.resize(width: 100, height: 200)
445+
popup2&.resize(width: 200, height: 100)
446446

447-
expect(popup1.viewport_size).to eq([100, 200])
448-
expect(popup2.viewport_size).to eq([200, 100])
447+
expect(popup1&.viewport_size).to eq([100, 200])
448+
expect(popup2&.viewport_size).to eq([200, 100])
449449
end
450450

451451
it "clears local storage after reset" do

0 commit comments

Comments
 (0)