diff --git a/docs/src/test-api/class-test.md b/docs/src/test-api/class-test.md index 82a467c29a..fe277d4347 100644 --- a/docs/src/test-api/class-test.md +++ b/docs/src/test-api/class-test.md @@ -343,17 +343,17 @@ test('runs first', async ({ page }) => {}); test('runs second', async ({ page }) => {}); ``` -Configuring retries and timeout: +Configuring retries and timeout for each test: ```js tab=js-js -// All tests in the file will be retried twice and have a timeout of 20 seconds. +// Each test in the file will be retried twice and have a timeout of 20 seconds. test.describe.configure({ retries: 2, timeout: 20_000 }); test('runs first', async ({ page }) => {}); test('runs second', async ({ page }) => {}); ``` ```js tab=js-ts -// All tests in the file will be retried twice and have a timeout of 20 seconds. +// Each test in the file will be retried twice and have a timeout of 20 seconds. test.describe.configure({ retries: 2, timeout: 20_000 }); test('runs first', async ({ page }) => {}); test('runs second', async ({ page }) => {}); @@ -363,14 +363,20 @@ test('runs second', async ({ page }) => {}); * since: v1.10 - `mode` <[TestMode]<"parallel"|"serial">> +Execution mode. Learn more about the execution modes [here](../test-parallel.md). + ### option: Test.describe.configure.retries * since: v1.28 - `retries` <[int]> +The number of retries for each test. + ### option: Test.describe.configure.timeout * since: v1.28 - `timeout` <[int]> +Timeout for each test in milliseconds. Overrides [`property: TestProject.timeout`] and [`property: TestConfig.timeout`]. + ## method: Test.describe.fixme * since: v1.25 diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts index 6410d1a052..b8f6c5f6c0 100644 --- a/packages/playwright-test/types/test.d.ts +++ b/packages/playwright-test/types/test.d.ts @@ -2123,10 +2123,10 @@ export interface TestType {}); * ``` * - * Configuring retries and timeout: + * Configuring retries and timeout for each test: * * ```js - * // All tests in the file will be retried twice and have a timeout of 20 seconds. + * // Each test in the file will be retried twice and have a timeout of 20 seconds. * test.describe.configure({ retries: 2, timeout: 20_000 }); * test('runs first', async ({ page }) => {}); * test('runs second', async ({ page }) => {});