Skip to content

Commit 8e54cff

Browse files
committed
docs: add actionTimeout to docs
1 parent c61d9d9 commit 8e54cff

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/guide/browser/playwright.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,19 @@ Vitest awlays sets `ignoreHTTPSErrors` to `true` in case your server is served v
7878

7979
It is also recommended to use [`test.browser.viewport`](/config/#browser-headless) instead of specifying it here as it will be lost when tests are running in headless mode.
8080
:::
81+
82+
## `actionTimeout` <Version>2.2.0</Version>
83+
84+
- **Default:** no timeout, 1 second before 2.2.0
85+
86+
This value configures the default timeout it takes for Playwright to wait until all accessibility checks pass and [the action](/guide/browser/interactivity-api) is actually done.
87+
88+
You can also configure the action timeout per-action:
89+
90+
```ts
91+
import { page, userEvent } from '@vitest/browser/context'
92+
93+
await userEvent.click(page.getByRole('button'), {
94+
timeout: 1_000,
95+
})
96+
```

0 commit comments

Comments
 (0)