From 661eabbc57bbda5c70d5bde575f70920a2d201f9 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Mon, 14 Sep 2026 13:39:17 +0200 Subject: [PATCH] Widen the same page to check a collapsed rail holds at extra-large Plan step 32. The Phase C rewrite checked the stored collapse at 1600px with a new visit(), but every visit opens a fresh browser context with empty storage, where the rail rightly starts expanded. The test now resizes the page that holds the choice. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- tests/Browser/NavigationTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Browser/NavigationTest.php b/tests/Browser/NavigationTest.php index 48776bf8..a732e103 100644 --- a/tests/Browser/NavigationTest.php +++ b/tests/Browser/NavigationTest.php @@ -140,8 +140,12 @@ it('expands the rail from large, and keeps it collapsed across a reload from the ->assertScript("window.eval('window.firstPaint.width') === '96px'") ->assertScript(railWidth(96)); - // Extra-large is the same band, and the collapse just chosen still holds there. - shellPage(1600, 900)->assertScript(railWidth(96)); + // Extra-large is the same band, and the collapse just chosen still holds there. The same page + // widened: every visit() opens a fresh browser context, whose storage holds no choice. + $page->resize(1600, 900) + ->assertScript("window.matchMedia('(width >= 1600px)').matches") + ->assertScript("document.documentElement.getAttribute('data-rail') === 'collapsed'") + ->assertScript(railWidth(96)); }); it('expands the rail by default at extra-large', function () {