Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: clarify updateSnapshot: changed behavior (#37427)

Yury Semikhatsky5e3e9be2fb19
diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.md
index b0cf02ccc2..63df7d30cb 100644
--- a/docs/src/test-api/class-testconfig.md
+++ b/docs/src/test-api/class-testconfig.md
@@ -627,7 +627,7 @@ export default defineConfig({
Whether to update expected snapshots with the actual results produced by the test run. Defaults to `'missing'`.
* `'all'` - All tests that are executed will update snapshots.
-* `'changed'` - All tests that are executed will update snapshots that did not match. Matching snapshots will not be updated.
+* `'changed'` - All tests that are executed will update snapshots that did not match. Matching snapshots will not be updated. Also creates missing snapshots.
* `'missing'` - Missing snapshots are created, for example when authoring a new test and running it for the first time. This is the default.
* `'none'` - No snapshots are updated.
diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts
index 87363f3a0f..d6a8606c80 100644
--- a/packages/playwright/types/test.d.ts
+++ b/packages/playwright/types/test.d.ts
@@ -1852,7 +1852,7 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
* Whether to update expected snapshots with the actual results produced by the test run. Defaults to `'missing'`.
* - `'all'` - All tests that are executed will update snapshots.
* - `'changed'` - All tests that are executed will update snapshots that did not match. Matching snapshots will not
- * be updated.
+ * be updated. Also creates missing snapshots.
* - `'missing'` - Missing snapshots are created, for example when authoring a new test and running it for the first
* time. This is the default.
* - `'none'` - No snapshots are updated.