Skip to content

Commit b761854

Browse files
authored
FIX: broken specs (#51)
This test is not ideal but I couldn't get it to be reliable under playwright, it should be enough to detect a regression.
1 parent e3e24fe commit b761854

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spec/system/post_spec.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@
4242

4343
it "redirects on click" do
4444
topic_page.visit_topic(topic)
45+
46+
try_until_success { expect(page.windows.length).to eq(1) }
47+
4548
page.find('[data-room="test-without-iframe"] button').click
46-
page.switch_to_window(page.windows.last)
47-
expect(page).to have_current_path("/test-without-iframe")
49+
50+
try_until_success { expect(page.windows.length).to eq(2) }
4851
end
4952
end
5053
end

0 commit comments

Comments
 (0)