Skip to content

Commit 2c9a565

Browse files
committed
Update snapshots
1 parent 31550ad commit 2c9a565

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/e2e/scripts/playwright/playwright.generate-tests.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ const port = 6006
2424

2525
const defaultTimeout = 500 // Storybook 7 introduced a small delay in loading stories. This is to migigate the spinner showing up in screenshots.
2626

27+
const reducedMotionLookup = [
28+
'recipes-flexsuite-overview--ai', // capture the stable video poster instead of a nondeterministic playback frame
29+
]
30+
2731
/**
2832
* Manual lookup for tests that need animation or side-effects to complete before tests start
2933
*/
@@ -233,6 +237,7 @@ for (const key of Object.keys(categorisedStories)) {
233237
const testName = language === 'en' ? base : `${base} (${language})`
234238
235239
return `test('${testName}', async ({page}) => {
240+
${reducedMotionLookup.includes(id) ? `await page.emulateMedia({ reducedMotion: 'reduce' })` : ''}
236241
await page.goto('http://localhost:${port}/iframe.html?${localeParam}args=&id=${id}&viewMode=story', { waitUntil: 'networkidle' })
237242
await page.locator('body.sb-show-main').waitFor({ state: 'visible' })
238243

packages/react/src/recipes/Flexsuite/Overview/Overview.visual.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {test, expect} from '@playwright/test'
88
// eslint-disable-next-line i18n-text/no-en
99
test.describe('Visual Comparison: Overview', () => {
1010
test('Overview / AI', async ({page}) => {
11+
await page.emulateMedia({reducedMotion: 'reduce'})
1112
await page.goto('http://localhost:6006/iframe.html?args=&id=recipes-flexsuite-overview--ai&viewMode=story', {
1213
waitUntil: 'networkidle',
1314
})
-29.1 KB
Loading

0 commit comments

Comments
 (0)