Skip to content

Commit 6d0d336

Browse files
balzssclaude
andcommitted
fix(regression-test): paint the theme page background on body so fullPage screenshots capture it
The background was set only on <html>. Cypress capture: 'fullPage' stitches the body onto its own canvas and does not reliably paint the <html> background into that image, so the dark surface showed in a real browser (and the report's HTML view) but not in the captured screenshots. Set it on <body> too, with min-height: 100vh so short pages still fill the frame. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5f1957e commit 6d0d336

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

regression-test/src/app/layout.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,18 @@ export default function RootLayout({
9898
theme={themes[themeKey]}
9999
instanceCounterMap={new Map()}
100100
>
101-
<body className={inter.className}>{children}</body>
101+
{/* Also set the background on <body> (with a full-viewport min-height):
102+
Cypress `capture: 'fullPage'` stitches the body onto its own canvas
103+
and does not reliably paint the <html> background into that image, so
104+
the html-only background shows in a real browser but not in the
105+
screenshots. Painting the body is what makes the dark surface appear
106+
in the captured baselines. */}
107+
<body
108+
className={inter.className}
109+
style={{ background: pageBackground, minHeight: '100vh' }}
110+
>
111+
{children}
112+
</body>
102113
</InstUISettingsProvider>
103114
</html>
104115
)

0 commit comments

Comments
 (0)