Skip to content

Commit

Permalink
Tune locator
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Jan 9, 2024
1 parent c82cacd commit e688f7b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ async function expectStoryToMatchSceneSnapshot(
theme: SnapshotTheme
): Promise<void> {
// Using .or() because in some cases there's no <main> (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(
Expand Down

0 comments on commit e688f7b

Please sign in to comment.