Skip to content

Commit a75652a

Browse files
nbudinclaude
andcommitted
Restart browser instead of simple retry when navigation leaves about:blank
A plain retry sends to the same broken Chrome process. browser.restart kills and relaunches Chrome cleanly so the subsequent visit "/" goes to a fresh process that can actually navigate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c50c0b3 commit a75652a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

test/system/page_weight_test.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ class PageWeightTest < ApplicationSystemTestCase
2626
it "loads the home page within the initial JS/CSS payload budget" do
2727
visit "/"
2828

29-
# On CI the root CMS page lookup occasionally causes "/" to respond slowly enough
30-
# that Ferrum's navigation times out, leaving Chrome at about:blank. Retry once.
31-
visit "/" if page.current_url.start_with?("about:")
29+
# Chrome occasionally gets stuck in a state where navigation silently fails on CI,
30+
# leaving the page at about:blank. Restarting the browser gives a clean Chrome
31+
# process that can actually navigate.
32+
if page.current_url.start_with?("about:")
33+
page.driver.browser.restart
34+
visit "/"
35+
end
3236

3337
# Wait for the React app to finish bootstrapping before sampling resources.
3438
assert page.has_css?("nav.navbar", wait: 30)

0 commit comments

Comments
 (0)