@@ -473,10 +473,25 @@ test("capture dashboard screenshot", async ({ page }) => {
473473
474474 await page . screenshot ( { path : "docs/dashboard-screenshot.png" } ) ;
475475
476- // Switch to compact density and capture a second screenshot
477- await page . evaluate ( ( ) => {
478- document . documentElement . dataset . density = "compact" ;
479- } ) ;
476+ // Switch to compact density: update the config in localStorage and reload
477+ // so SolidJS reactive state (isCompact memos, <Show> guards) picks it up.
478+ // Switch to compact density via the settings UI (client-side nav to preserve store state)
479+ await page . getByRole ( "link" , { name : "Settings" } ) . click ( ) ;
480+ await page . getByRole ( "button" , { name : / v i e w d e n s i t y : c o m p a c t / i } ) . waitFor ( ) ;
481+ await page . getByRole ( "button" , { name : / v i e w d e n s i t y : c o m p a c t / i } ) . click ( ) ;
482+ await page . getByRole ( "button" , { name : / v i e w d e n s i t y : c o m p a c t / i, pressed : true } ) . waitFor ( ) ;
483+
484+ // Navigate back to dashboard via the back link (client-side, no full reload)
485+ await page . getByRole ( "link" , { name : "Back to dashboard" } ) . click ( ) ;
486+ await page . getByRole ( "tablist" ) . waitFor ( ) ;
487+ await page . getByRole ( "tab" , { name : / p u l l r e q u e s t s / i } ) . click ( ) ;
488+ await page . getByRole ( "tab" , { name : / p u l l r e q u e s t s / i, selected : true } ) . waitFor ( ) ;
489+ await page . getByText ( "acme-corp/web-platform" ) . first ( ) . waitFor ( ) ;
490+ const compactRepoBtn = page . getByRole ( "button" , { expanded : false } ) . filter ( { hasText : "acme-corp/web-platform" } ) ;
491+ if ( await compactRepoBtn . isVisible ( ) ) {
492+ await compactRepoBtn . click ( ) ;
493+ await page . getByRole ( "button" , { expanded : true } ) . filter ( { hasText : "acme-corp/web-platform" } ) . waitFor ( ) ;
494+ }
480495
481496 await page . screenshot ( { path : "docs/dashboard-screenshot-compact.png" } ) ;
482497} ) ;
0 commit comments