From ed5eb98d8eb1783a7bc2655601ad728dd3f15f17 Mon Sep 17 00:00:00 2001 From: hakshu Date: Tue, 7 May 2024 21:36:02 +0900 Subject: [PATCH 1/3] Fix typo in test-runner-image-snapshot-testing.js.mdx --- docs/snippets/common/test-runner-image-snapshot-testing.js.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx index b08405d1505c..df88801ddbbc 100644 --- a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx +++ b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx @@ -14,7 +14,7 @@ module.exports = { // Waits for the page to be ready before taking a screenshot to ensure consistent results await waitForPageReady(page); - // To capture a screenshot for for different browsers, add page.context().browser().browserType().name() to get the browser name to prefix the file name + // To capture a screenshot for different browsers, add page.context().browser().browserType().name() to get the browser name to prefix the file name const image = await page.screenshot(); expect(image).toMatchImageSnapshot({ customSnapshotsDir, From 88f8c171132737f3133d65be90fda111d5f205d5 Mon Sep 17 00:00:00 2001 From: hakshu25 Date: Tue, 7 May 2024 21:49:31 +0900 Subject: [PATCH 2/3] Fix missing require waitForPageReady in test-runner-image-snapshot-testing.js.mdx --- docs/snippets/common/test-runner-image-snapshot-testing.js.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx index df88801ddbbc..dacc97f62d5f 100644 --- a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx +++ b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx @@ -1,6 +1,7 @@ ```js // .storybook/test-runner.js +const { waitForPageReady } = require('@storybook/test-runner'); const { toMatchImageSnapshot } = require('jest-image-snapshot'); const customSnapshotsDir = `${process.cwd()}/__snapshots__`; From cc3ffe7bedc3cdcfeb7abed9ed24cafe86187604 Mon Sep 17 00:00:00 2001 From: hakshu25 Date: Thu, 9 May 2024 06:05:17 +0900 Subject: [PATCH 3/3] Revert "Fix missing require waitForPageReady in test-runner-image-snapshot-testing.js.mdx" This reverts commit 88f8c171132737f3133d65be90fda111d5f205d5. --- docs/snippets/common/test-runner-image-snapshot-testing.js.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx index dacc97f62d5f..df88801ddbbc 100644 --- a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx +++ b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx @@ -1,7 +1,6 @@ ```js // .storybook/test-runner.js -const { waitForPageReady } = require('@storybook/test-runner'); const { toMatchImageSnapshot } = require('jest-image-snapshot'); const customSnapshotsDir = `${process.cwd()}/__snapshots__`;