diff --git a/code/package.json b/code/package.json
index 45dbc0513fa2..6364b6eb3220 100644
--- a/code/package.json
+++ b/code/package.json
@@ -235,7 +235,6 @@
"husky": "^4.3.7",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
- "jest-image-snapshot": "^6.0.0",
"jest-junit": "^16.0.0",
"jest-os-detection": "^1.3.1",
"jest-serializer-html": "^7.1.0",
diff --git a/code/yarn.lock b/code/yarn.lock
index 7b0995c2621c..b7ac09c53d66 100644
--- a/code/yarn.lock
+++ b/code/yarn.lock
@@ -7295,7 +7295,6 @@ __metadata:
husky: ^4.3.7
jest: ^29.5.0
jest-environment-jsdom: ^29.5.0
- jest-image-snapshot: ^6.0.0
jest-junit: ^16.0.0
jest-os-detection: ^1.3.1
jest-serializer-html: ^7.1.0
@@ -16963,13 +16962,6 @@ __metadata:
languageName: node
linkType: hard
-"get-stdin@npm:^5.0.1":
- version: 5.0.1
- resolution: "get-stdin@npm:5.0.1"
- checksum: 309f933f08a4d6783681674451027802299124e596324cd628c5e5138bbc5de843bbaa345a8ce0fc72304869f9de3b50086407aca551e292b13f7cb02351479e
- languageName: node
- linkType: hard
-
"get-stdin@npm:^6.0.0":
version: 6.0.0
resolution: "get-stdin@npm:6.0.0"
@@ -17353,13 +17345,6 @@ __metadata:
languageName: node
linkType: hard
-"glur@npm:^1.1.2":
- version: 1.1.2
- resolution: "glur@npm:1.1.2"
- checksum: 756fcbc7f1a8576755811e31367feeaffbd13b7f20d788672bccbd65956839065e256621a7576f4ab321352b28a0aea442d64567bca23882526b891767ffbe3e
- languageName: node
- linkType: hard
-
"google-auth-library@npm:^7.14.0":
version: 7.14.1
resolution: "google-auth-library@npm:7.14.1"
@@ -19578,27 +19563,6 @@ __metadata:
languageName: node
linkType: hard
-"jest-image-snapshot@npm:^6.0.0":
- version: 6.2.0
- resolution: "jest-image-snapshot@npm:6.2.0"
- dependencies:
- chalk: ^4.0.0
- get-stdin: ^5.0.1
- glur: ^1.1.2
- lodash: ^4.17.4
- pixelmatch: ^5.1.0
- pngjs: ^3.4.0
- rimraf: ^2.6.2
- ssim.js: ^3.1.1
- peerDependencies:
- jest: ">=20 <=29"
- peerDependenciesMeta:
- jest:
- optional: true
- checksum: 62e415f86f2bed30fe126520519014beed61a38a678285de44c6544d10eed7381b28958d3406f131a60c05715f42ab7bf7ea4ecfdab4f55946cec6739de23924
- languageName: node
- linkType: hard
-
"jest-junit@npm:^16.0.0":
version: 16.0.0
resolution: "jest-junit@npm:16.0.0"
@@ -21155,7 +21119,7 @@ __metadata:
languageName: node
linkType: hard
-"lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0":
+"lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.7.0":
version: 4.17.21
resolution: "lodash@npm:4.17.21"
checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c
@@ -24790,17 +24754,6 @@ __metadata:
languageName: node
linkType: hard
-"pixelmatch@npm:^5.1.0":
- version: 5.3.0
- resolution: "pixelmatch@npm:5.3.0"
- dependencies:
- pngjs: ^6.0.0
- bin:
- pixelmatch: bin/pixelmatch
- checksum: 30850661db29b57cefbe6cf36e930b7517aea4e0ed129e85fcc8ec04a7e6e7648a822a972f8e01d2d3db268ca3c735555caf6b8099a164d8b64d105986d682d2
- languageName: node
- linkType: hard
-
"pkg-dir@npm:^3.0.0":
version: 3.0.0
resolution: "pkg-dir@npm:3.0.0"
@@ -24882,20 +24835,6 @@ __metadata:
languageName: node
linkType: hard
-"pngjs@npm:^3.4.0":
- version: 3.4.0
- resolution: "pngjs@npm:3.4.0"
- checksum: 88ee73e2ad3f736e0b2573722309eb80bd2aa28916f0862379b4fd0f904751b4f61bb6bd1ecd7d4242d331f2b5c28c13309dd4b7d89a9b78306e35122fdc5011
- languageName: node
- linkType: hard
-
-"pngjs@npm:^6.0.0":
- version: 6.0.0
- resolution: "pngjs@npm:6.0.0"
- checksum: ac23ea329b1881d1a10575aff58116dc27b894ec3f5b84ba15c7f527d21e609fbce7ba16d48f8ccb86c7ce45ceed622472765476ab2875949d4bec55e153f87a
- languageName: node
- linkType: hard
-
"pnp-webpack-plugin@npm:^1.7.0":
version: 1.7.0
resolution: "pnp-webpack-plugin@npm:1.7.0"
@@ -28345,13 +28284,6 @@ __metadata:
languageName: node
linkType: hard
-"ssim.js@npm:^3.1.1":
- version: 3.5.0
- resolution: "ssim.js@npm:3.5.0"
- checksum: 9e7101da17395d3acbd417aac712d8f156522e79059a27cb38882eedd5a8868e31871c8f58bec3a150f8cf0660883cf22310cbd2fd63b408c1fd0ab02fda9fbc
- languageName: node
- linkType: hard
-
"ssri@npm:9.0.1, ssri@npm:^9.0.0":
version: 9.0.1
resolution: "ssri@npm:9.0.1"
diff --git a/docs/toc.js b/docs/toc.js
index 9c773a493244..ebc0a878eccb 100644
--- a/docs/toc.js
+++ b/docs/toc.js
@@ -168,11 +168,6 @@ module.exports = {
title: 'Test coverage',
type: 'link',
},
- {
- pathSegment: 'snapshot-testing',
- title: 'Snapshot tests',
- type: 'link',
- },
{
pathSegment: '',
title: 'Import stories in tests',
diff --git a/docs/writing-tests/snapshot-test.png b/docs/writing-tests/snapshot-test.png
deleted file mode 100644
index 5446154fccc4..000000000000
Binary files a/docs/writing-tests/snapshot-test.png and /dev/null differ
diff --git a/docs/writing-tests/snapshot-testing.md b/docs/writing-tests/snapshot-testing.md
deleted file mode 100644
index 69b0c17c680a..000000000000
--- a/docs/writing-tests/snapshot-testing.md
+++ /dev/null
@@ -1,168 +0,0 @@
----
-title: 'Snapshot tests'
----
-
-Snapshot tests compare the rendered markup of every story against known baselines. It’s a way to identify markup changes that trigger rendering errors and warnings.
-
-Storybook is a helpful tool for snapshot testing because every story is essentially a test specification. Any time you write or update a story, you get a snapshot test for free.
-
-![Example Snapshot test](./snapshot-test.png)
-
-## Set up test runner
-
-Storybook test runner turns all of your stories into executable tests. It is powered by [Jest](https://jestjs.io/) and [Playwright](https://playwright.dev/).
-
-Follow the [setup instructions](./test-runner#setup) to install and run the test runner.
-
-Then, you can use the [test hook API](./test-runner#test-hook-api-experimental) to snapshot the HTML of each story:
-
-
-
-
-
-
-
-When running in [index.json mode](./test-runner#indexjson-mode), tests are generated in a temporary folder and snapshots get stored alongside them. You will need to [`--eject`](./test-runner#configure) and configure a custom [`snapshotResolver`](https://jestjs.io/docs/configuration#snapshotresolver-string) to store them elsewhere, e.g. in your working directory:
-
-```js
-// ./test-runner-jest.config.js
-
-const path = require('path');
-
-module.exports = {
- resolveSnapshotPath: (testPath, snapshotExtension) =>
- path.join(process.cwd(), '__snapshots__', path.basename(testPath) + snapshotExtension),
- resolveTestPath: (snapshotFilePath, snapshotExtension) =>
- path.join(process.env.TEST_ROOT, path.basename(snapshotFilePath, snapshotExtension)),
- testPathForConsistencyCheck: path.join(process.env.TEST_ROOT, 'example.test.js'),
-};
-```
-
-Finally, you can [set up test runner to run your tests in CI](./test-runner.md#set-up-ci-to-run-tests).
-
-There are many other configuration options available, such as watch mode and coverage. Please reference the [test runner documentation](./test-runner) for more information.
-
-## Set up Storyshots
-
-
-
-⛔️ Storyshots has been deprecated in favor of [test runner](./test-runner.md), which you can use for both snapshot and [visual testing](./visual-testing.md).
-
-
-
-[Storyshots](https://storybook.js.org/addons/@storybook/addon-storyshots/) is a Storybook addon that enables snapshot testing, powered by [Jest](https://jestjs.io/docs/getting-started).
-
-Run the following command to install Storyshots:
-
-
-
-
-
-
-
-Add a test file to your environment with the following contents to configure Storyshots:
-
-
-
-
-
-
-
-
-💡 You can name the test file differently to suit your needs. Bear in mind that it requires to be picked up by Jest.
-
-
-Run your first test. Storyshots will recognize your stories (based on [.storybook/main.js's setup](https://storybook.js.org/docs/react/configure/story-rendering)) and save them in the **snapshots** directory.
-
-```shell
-npm test storybook.test.js
-```
-
-![Successful snapshot tests](./storyshots-pass.png)
-
-When you make changes to your components or stories, rerun the test to identify the changes to the rendered markup.
-
-![Failing snapshots](./storyshots-fail.png)
-
-If they're intentional, accept them as new baselines. If the changes are bugs, fix the underlying code, then rerun the snapshot tests.
-
-### Configure the snapshot's directory
-
-If your project has a custom setup for snapshot testing, you'll need to take additional steps to run Storyshots. You'll need to install both [@storybook/addon-storyshots-puppeteer](https://storybook.js.org/addons/@storybook/addon-storyshots-puppeteer) and [puppeteer](https://github.com/puppeteer/puppeteer):
-
-```shell
-# With npm
-npm i -D @storybook/addon-storyshots-puppeteer puppeteer
-
-# With yarn
-yarn add @storybook/addon-storyshots-puppeteer puppeteer
-```
-
-Next, update your test file (for example, `storybook.test.js`) to the following:
-
-
-
-
-
-
-
-
-💡 Don't forget to replace your-custom-directory with your own.
-
-
-When you run your tests, the snapshots will be available in the directory you've specified.
-
-### Framework configuration
-
-By default, Storyshots detects your project's framework. If you run into a situation where this is not the case, you can adjust the configuration object and specify your framework. For example, if you wanted to configure the addon for a Vue 3 project:
-
-
-
-
-
-
-
-These are the frameworks currently supported by Storyshots: `angular`, `html`, `preact`, `react`, `react-native`, `svelte`, `vue`, `vue3`, and `web-components`.
-
-### Additional customization
-
-Storyshots is highly customizable and includes options for various advanced use cases. You can read more in the [addon’s documentation](https://github.com/storybookjs/storybook/tree/master/addons/storyshots/storyshots-core#options).
-
----
-
-#### What’s the difference between snapshot tests and visual tests?
-
-Visual tests capture images of stories and compare them against image baselines. Snapshot tests take DOM snapshots and compare them against DOM baselines. Visual tests are better suited for verifying appearance. Snapshot tests are useful for smoke testing and ensuring the DOM doesn’t change.
-
-#### Learn about other UI tests
-
-- [Test runner](./test-runner.md) to automate test execution
-- [Visual tests](./visual-testing.md) for appearance
-- [Accessibility tests](./accessibility-testing.md) for accessibility
-- [Interaction tests](./interaction-testing.md) for user behavior simulation
-- [Coverage tests](./test-coverage.md) for measuring code coverage
-- Snapshot tests for rendering errors and warnings
-- [End-to-end tests](./stories-in-end-to-end-tests.md) for simulating real user scenarios
-- [Unit tests](./stories-in-unit-tests.md) for functionality
diff --git a/scripts/package.json b/scripts/package.json
index b6020c436390..d38c2707ae00 100644
--- a/scripts/package.json
+++ b/scripts/package.json
@@ -140,7 +140,6 @@
"husky": "^4.3.7",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
- "jest-image-snapshot": "^6.0.0",
"jest-junit": "^14.0.1",
"jest-mock-extended": "^3.0.4",
"jest-os-detection": "^1.3.1",
diff --git a/scripts/yarn.lock b/scripts/yarn.lock
index 504a13091f02..21497980d15a 100644
--- a/scripts/yarn.lock
+++ b/scripts/yarn.lock
@@ -3018,7 +3018,6 @@ __metadata:
husky: ^4.3.7
jest: ^29.3.1
jest-environment-jsdom: ^29.3.1
- jest-image-snapshot: ^6.0.0
jest-junit: ^14.0.1
jest-mock-extended: ^3.0.4
jest-os-detection: ^1.3.1
@@ -8499,13 +8498,6 @@ __metadata:
languageName: node
linkType: hard
-"get-stdin@npm:^5.0.1":
- version: 5.0.1
- resolution: "get-stdin@npm:5.0.1"
- checksum: 309f933f08a4d6783681674451027802299124e596324cd628c5e5138bbc5de843bbaa345a8ce0fc72304869f9de3b50086407aca551e292b13f7cb02351479e
- languageName: node
- linkType: hard
-
"get-stdin@npm:^6.0.0":
version: 6.0.0
resolution: "get-stdin@npm:6.0.0"
@@ -8794,13 +8786,6 @@ __metadata:
languageName: node
linkType: hard
-"glur@npm:^1.1.2":
- version: 1.1.2
- resolution: "glur@npm:1.1.2"
- checksum: 756fcbc7f1a8576755811e31367feeaffbd13b7f20d788672bccbd65956839065e256621a7576f4ab321352b28a0aea442d64567bca23882526b891767ffbe3e
- languageName: node
- linkType: hard
-
"google-auth-library@npm:^8.0.2":
version: 8.9.0
resolution: "google-auth-library@npm:8.9.0"
@@ -10256,27 +10241,6 @@ __metadata:
languageName: node
linkType: hard
-"jest-image-snapshot@npm:^6.0.0":
- version: 6.2.0
- resolution: "jest-image-snapshot@npm:6.2.0"
- dependencies:
- chalk: ^4.0.0
- get-stdin: ^5.0.1
- glur: ^1.1.2
- lodash: ^4.17.4
- pixelmatch: ^5.1.0
- pngjs: ^3.4.0
- rimraf: ^2.6.2
- ssim.js: ^3.1.1
- peerDependencies:
- jest: ">=20 <=29"
- peerDependenciesMeta:
- jest:
- optional: true
- checksum: 62e415f86f2bed30fe126520519014beed61a38a678285de44c6544d10eed7381b28958d3406f131a60c05715f42ab7bf7ea4ecfdab4f55946cec6739de23924
- languageName: node
- linkType: hard
-
"jest-junit@npm:^14.0.1":
version: 14.0.1
resolution: "jest-junit@npm:14.0.1"
@@ -11322,7 +11286,7 @@ __metadata:
languageName: node
linkType: hard
-"lodash@npm:4, lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.21, lodash@npm:^4.17.4":
+"lodash@npm:4, lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.21":
version: 4.17.21
resolution: "lodash@npm:4.17.21"
checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c
@@ -13318,17 +13282,6 @@ __metadata:
languageName: node
linkType: hard
-"pixelmatch@npm:^5.1.0":
- version: 5.3.0
- resolution: "pixelmatch@npm:5.3.0"
- dependencies:
- pngjs: ^6.0.0
- bin:
- pixelmatch: bin/pixelmatch
- checksum: 30850661db29b57cefbe6cf36e930b7517aea4e0ed129e85fcc8ec04a7e6e7648a822a972f8e01d2d3db268ca3c735555caf6b8099a164d8b64d105986d682d2
- languageName: node
- linkType: hard
-
"pkg-dir@npm:^4.2.0":
version: 4.2.0
resolution: "pkg-dir@npm:4.2.0"
@@ -13399,20 +13352,6 @@ __metadata:
languageName: node
linkType: hard
-"pngjs@npm:^3.4.0":
- version: 3.4.0
- resolution: "pngjs@npm:3.4.0"
- checksum: 88ee73e2ad3f736e0b2573722309eb80bd2aa28916f0862379b4fd0f904751b4f61bb6bd1ecd7d4242d331f2b5c28c13309dd4b7d89a9b78306e35122fdc5011
- languageName: node
- linkType: hard
-
-"pngjs@npm:^6.0.0":
- version: 6.0.0
- resolution: "pngjs@npm:6.0.0"
- checksum: ac23ea329b1881d1a10575aff58116dc27b894ec3f5b84ba15c7f527d21e609fbce7ba16d48f8ccb86c7ce45ceed622472765476ab2875949d4bec55e153f87a
- languageName: node
- linkType: hard
-
"portfinder@npm:^1.0.28":
version: 1.0.32
resolution: "portfinder@npm:1.0.32"
@@ -14773,17 +14712,6 @@ __metadata:
languageName: node
linkType: hard
-"rimraf@npm:^2.6.2":
- version: 2.7.1
- resolution: "rimraf@npm:2.7.1"
- dependencies:
- glob: ^7.1.3
- bin:
- rimraf: ./bin.js
- checksum: 4eef73d406c6940927479a3a9dee551e14a54faf54b31ef861250ac815172bade86cc6f7d64a4dc5e98b65e4b18a2e1c9ff3b68d296be0c748413f092bb0dd40
- languageName: node
- linkType: hard
-
"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2":
version: 3.0.2
resolution: "rimraf@npm:3.0.2"
@@ -15378,13 +15306,6 @@ __metadata:
languageName: node
linkType: hard
-"ssim.js@npm:^3.1.1":
- version: 3.5.0
- resolution: "ssim.js@npm:3.5.0"
- checksum: 9e7101da17395d3acbd417aac712d8f156522e79059a27cb38882eedd5a8868e31871c8f58bec3a150f8cf0660883cf22310cbd2fd63b408c1fd0ab02fda9fbc
- languageName: node
- linkType: hard
-
"ssri@npm:^10.0.0":
version: 10.0.5
resolution: "ssri@npm:10.0.5"