diff --git a/.storybook/test-runner.ts b/.storybook/test-runner.ts index ec588d68b24a70..8e45d54111a1a7 100644 --- a/.storybook/test-runner.ts +++ b/.storybook/test-runner.ts @@ -166,7 +166,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(