From 2ee3aaa0f5d1500f576f40004b36bda3263be94b Mon Sep 17 00:00:00 2001
From: Playwright Service <89237858+playwrightmachine@users.noreply.github.com>
Date: Tue, 17 Oct 2023 23:28:43 -0700
Subject: [PATCH] cherry-pick(#27667): docs: make test-timeouts AAA compliant
(#27676)
This PR cherry-picks the following commits:
- a005064cc8665af9eb536d897eada08abfc22c9e
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
---
docs/src/test-timeouts-js.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/src/test-timeouts-js.md b/docs/src/test-timeouts-js.md
index 94d2d8a85c..61d148f8fb 100644
--- a/docs/src/test-timeouts-js.md
+++ b/docs/src/test-timeouts-js.md
@@ -9,8 +9,8 @@ Playwright Test has multiple configurable timeouts for various tasks.
|Timeout |Default |Description |
|:----------|:----------------|:--------------------------------|
-|Test timeout|30000 ms|Timeout for each test, includes test, hooks and fixtures:
Set default
{`config = { timeout: 60000 }`}
Override
`test.setTimeout(120000)` |
-|Expect timeout|5000 ms|Timeout for each assertion:
Set default
{`config = { expect: { timeout: 10000 } }`}
Override
`expect(locator).toBeVisible({ timeout: 10000 })` |
+|Test timeout|30000 ms|Timeout for each test, includes test, hooks and fixtures:
Set default
{`config = { timeout: 60000 }`}
Override
`test.setTimeout(120000)` |
+|Expect timeout|5000 ms|Timeout for each assertion:
Set default
{`config = { expect: { timeout: 10000 } }`}
Override
`expect(locator).toBeVisible({ timeout: 10000 })` |
## Test timeout
@@ -144,11 +144,11 @@ If you happen to be in this section because your test are flaky, it is very like
|Timeout |Default |Description |
|:----------|:----------------|:--------------------------------|
-|Action timeout| no timeout |Timeout for each action:
Set default
{`config = { use: { actionTimeout: 10000 } }`}
Override
`locator.click({ timeout: 10000 })` |
-|Navigation timeout| no timeout |Timeout for each navigation action:
Set default
{`config = { use: { navigationTimeout: 30000 } }`}
Override
`page.goto('/', { timeout: 30000 })` |
-|Global timeout|no timeout |Global timeout for the whole test run:
Set in config
`config = { globalTimeout: 60*60*1000 }`
|
-|`beforeAll`/`afterAll` timeout|30000 ms|Timeout for the hook:
Set in hook
`test.setTimeout(60000)`
|
-|Fixture timeout|no timeout |Timeout for an individual fixture:
Set in fixture
`{ scope: 'test', timeout: 30000 }`
|
+|Action timeout| no timeout |Timeout for each action:
Set default
{`config = { use: { actionTimeout: 10000 } }`}
Override
`locator.click({ timeout: 10000 })` |
+|Navigation timeout| no timeout |Timeout for each navigation action:
Set default
{`config = { use: { navigationTimeout: 30000 } }`}
Override
`page.goto('/', { timeout: 30000 })` |
+|Global timeout|no timeout |Global timeout for the whole test run:
Set in config
`config = { globalTimeout: 60*60*1000 }`
|
+|`beforeAll`/`afterAll` timeout|30000 ms|Timeout for the hook:
Set in hook
`test.setTimeout(60000)`
|
+|Fixture timeout|no timeout |Timeout for an individual fixture:
Set in fixture
`{ scope: 'test', timeout: 30000 }`
|
### Set timeout for a single assertion