Skip to content

Commit

Permalink
Tune locator
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Mar 11, 2024
1 parent 47b3234 commit 685e72f
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 @@ -166,7 +166,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 685e72f

Please sign in to comment.