From d6dfb2b43be9d9de01687bda01d1ec69c203cc8d Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Fri, 23 Feb 2024 20:18:44 -0600 Subject: [PATCH] docs(class-testoptions.md): update trace option with new on-first-failure mode. --- docs/src/test-api/class-testoptions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/test-api/class-testoptions.md b/docs/src/test-api/class-testoptions.md index 946171a935..9e2e3353c2 100644 --- a/docs/src/test-api/class-testoptions.md +++ b/docs/src/test-api/class-testoptions.md @@ -547,7 +547,7 @@ export default defineConfig({ ## property: TestOptions.trace * since: v1.10 - type: <[Object]|[TraceMode]<"off"|"on"|"retain-on-failure"|"on-first-retry">> - - `mode` <[TraceMode]<"off"|"on"|"retain-on-failure"|"on-first-retry"|"on-all-retries">> Trace recording mode. + - `mode` <[TraceMode]<"off"|"on"|"retain-on-failure"|"on-first-retry"|"on-all-retries"|"on-first-failure">> Trace recording mode. - `attachments` ?<[boolean]> Whether to include test attachments. Defaults to true. Optional. - `screenshots` ?<[boolean]> Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview. Defaults to true. Optional. - `snapshots` ?<[boolean]> Whether to capture DOM snapshot on every action. Defaults to true. Optional. @@ -559,6 +559,7 @@ Whether to record trace for each test. Defaults to `'off'`. * `'retain-on-failure'`: Record trace for each test, but remove all traces from successful test runs. * `'on-first-retry'`: Record trace only when retrying a test for the first time. * `'on-all-retries'`: Record traces only when retrying for all retries. +* `'on-first-failure'`: Record traces only when the test fails for the first time. For more control, pass an object that specifies `mode` and trace features to enable.