From aa023867e9a90a2ab38699eb8170b595980fb367 Mon Sep 17 00:00:00 2001 From: Akash Gautam Date: Wed, 6 Mar 2024 12:00:38 +0530 Subject: [PATCH] fix: test setup --- example/storybook/tests/example.spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/storybook/tests/example.spec.js b/example/storybook/tests/example.spec.js index e7b8a78746..f177c44760 100644 --- a/example/storybook/tests/example.spec.js +++ b/example/storybook/tests/example.spec.js @@ -96,7 +96,7 @@ for (const [key, value] of Object.entries(testData)) { )}`, async ({ page }, testinfo) => { await page.goto(storybookUrl); if (overlay) await page.waitForTimeout(300); - testinfo.snapshotSuffix = ''; + testinfo.snapshotSuffix = '-darwin'; expect(await page.screenshot()).toMatchSnapshot({ maxDiffPixels: 100, }); @@ -109,7 +109,7 @@ for (const [key, value] of Object.entries(testData)) { // case: typeOfTest === 'default' // no args are passed, basic story will run - test(`${key} is displayed`, async ({ page }) => { + test(`${key} is displayed`, async ({ page }, testinfo) => { const storybookUrl = path.join( 'file://', __dirname, @@ -117,6 +117,7 @@ for (const [key, value] of Object.entries(testData)) { ); await page.goto(storybookUrl); if (overlay) await page.waitForTimeout(300); + testinfo.snapshotSuffix = '-darwin'; expect(await page.screenshot()).toMatchSnapshot({ maxDiffPixels: 100, });