diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts index c31dabc8afe1d..eac49d0680894 100644 --- a/.storybook/test-runner.ts +++ b/.storybook/test-runner.ts @@ -167,7 +167,12 @@ async function expectStoryToMatchSceneSnapshot( theme: SnapshotTheme ): Promise { // Using .or() because in some cases there's no
(primarily logged-out screens) - await expectLocatorToMatchStorySnapshot(page.locator('main').or(page), context, browser, theme) + await expectLocatorToMatchStorySnapshot( + page.locator('main').or(page.locator('body')).first(), + context, + browser, + theme + ) } async function expectStoryToMatchComponentSnapshot(