Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: clarify updateSourceMethod (#34314)
Pavel Feldmanfe96104ce2cc
diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.mdindex 90425fcf4c..5a67ea36d4 100644--- a/docs/src/test-api/class-testconfig.md+++ b/docs/src/test-api/class-testconfig.md@@ -594,10 +594,10 @@ export default defineConfig({* since: v1.50- type: ?<[UpdateSourceMethod]<"overwrite"|"3way"|"patch">>-Defines how to update the source code snapshots.-* `'overwrite'` - Overwrite the source code snapshot with the actual result.-* `'3way'` - Use a three-way merge to update the source code snapshot.-* `'patch'` - Use a patch to update the source code snapshot. This is the default.+Defines how to update snapshots in the source code.+* `'patch'` - Create a unified diff file that can be used to update the source code later. This is the default.+* `'3way'` - Generate merge conflict markers in source code. This allows user to manually pick relevant changes, as if they are resolving a merge conflict in the IDE.+* `'overwrite'` - Overwrite the source code with the new snapshot values.## property: TestConfig.use* since: v1.10diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.tsindex 6c772e3afb..194a3c4664 100644--- a/packages/playwright/types/test.d.ts+++ b/packages/playwright/types/test.d.ts@@ -1689,10 +1689,11 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {updateSnapshots?: "all"|"changed"|"missing"|"none";/**- * Defines how to update the source code snapshots.- * - `'overwrite'` - Overwrite the source code snapshot with the actual result.- * - `'3way'` - Use a three-way merge to update the source code snapshot.- * - `'patch'` - Use a patch to update the source code snapshot. This is the default.+ * Defines how to update snapshots in the source code.+ * - `'patch'` - Create a unified diff file that can be used to update the source code later. This is the default.+ * - `'3way'` - Generate merge conflict markers in source code. This allows user to manually pick relevant changes,+ * as if they are resolving a merge conflict in the IDE.+ * - `'overwrite'` - Overwrite the source code with the new snapshot values.*/updateSourceMethod?: "overwrite"|"3way"|"patch";