playwright/docs/src/test-api
Hansanto a950a7b86b
feat: Support intervals arg for toPass (#30037)
Fixes #30040

# Context

In the `playwright.config` file, we can custom the default `timeout`
property for `expect.toPass` by the property:

```ts title='playwright.config.ts'
export default defineConfig({
  // ...
  expect: {
    toPass: {
      timeout: 60_000,
    },
  },
});
```

However, we can't customize the `intervals` option. So the default value
is always `[100, 250, 500, 1000]`.

# Goal

Add the possibility to customize the intervals option from the
`playwright.config` file.

```ts title='playwright.config.ts'
export default defineConfig({
  // ...
  expect: {
    toPass: {
      timeout: 60_000,
      intervals: [1000, 2000, 3000]
    },
  },
});
```
2024-03-29 10:17:29 -07:00
..
class-fixtures.md docs: drop duplicate JS code snippets from test-api (#21466) 2023-03-16 19:01:15 +01:00
class-test.md chore: remove --tag and tagFilter (#29468) 2024-02-15 11:37:16 -08:00
class-testconfig.md feat: Support intervals arg for toPass (#30037) 2024-03-29 10:17:29 -07:00
class-testinfo.md feat: exposes tags in testInfo (#29794) 2024-03-06 08:33:06 -08:00
class-testinfoerror.md chore: report error location for fatal errors (#19610) 2022-12-21 09:36:59 -08:00
class-testoptions.md feat: address api review feedback for 1.43 (#30066) 2024-03-25 07:42:13 -07:00
class-testproject.md feat: Support intervals arg for toPass (#30037) 2024-03-29 10:17:29 -07:00
class-workerinfo.md docs: fix details about WorkerInfo vs TestInfo availability (#21699) 2023-03-16 12:36:34 -07:00