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 () {