mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: improve test.describe.configure()
(#18705)
This commit is contained in:
parent
7c80b77c57
commit
6d456d30dc
@ -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
|
||||
|
4
packages/playwright-test/types/test.d.ts
vendored
4
packages/playwright-test/types/test.d.ts
vendored
@ -2123,10 +2123,10 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||
* test('runs second', async ({ page }) => {});
|
||||
* ```
|
||||
*
|
||||
* 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 }) => {});
|
||||
|
Loading…
x
Reference in New Issue
Block a user