docs: cleanup test.describe.parallel.only doc (#9159)
This commit is contained in:
parent
ee25fefb62
commit
0801a8c486
|
|
@ -283,27 +283,7 @@ A callback that is run immediately when calling [`method: Test.describe.parallel
|
||||||
|
|
||||||
## method: Test.describe.parallel.only
|
## method: Test.describe.parallel.only
|
||||||
|
|
||||||
Declares a focused group of tests that could be run in parallel. By default, tests in a single test file run one after another, but using [`method: Test.describe.parallel`] allows them to run in parallel. If there are some focused tests or suites, all of them will be run but nothing else.
|
Declares a focused group of tests that could be run in parallel. This is similar to [`method: Test.describe.parallel`], but focuses the group. If there are some focused tests or suites, all of them will be run but nothing else.
|
||||||
|
|
||||||
```js js-flavor=js
|
|
||||||
test.describe.parallel.only('group', () => {
|
|
||||||
test('runs in parallel 1', async ({ page }) => {
|
|
||||||
});
|
|
||||||
test('runs in parallel 2', async ({ page }) => {
|
|
||||||
});
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
```js js-flavor=ts
|
|
||||||
test.describe.parallel.only('group', () => {
|
|
||||||
test('runs in parallel 1', async ({ page }) => {
|
|
||||||
});
|
|
||||||
test('runs in parallel 2', async ({ page }) => {
|
|
||||||
});
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that parallel tests are executed in separate processes and cannot share any state or global variables. Each of the parallel tests executes all relevant hooks.
|
|
||||||
|
|
||||||
### param: Test.describe.parallel.only.title
|
### param: Test.describe.parallel.only.title
|
||||||
- `title` <[string]>
|
- `title` <[string]>
|
||||||
|
|
|
||||||
19
types/test.d.ts
vendored
19
types/test.d.ts
vendored
|
|
@ -1267,22 +1267,9 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||||
*/
|
*/
|
||||||
parallel: SuiteFunction & {
|
parallel: SuiteFunction & {
|
||||||
/**
|
/**
|
||||||
* Declares a focused group of tests that could be run in parallel. By default, tests in a single test file run one after
|
* Declares a focused group of tests that could be run in parallel. This is similar to
|
||||||
* another, but using
|
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel), but
|
||||||
* [test.describe.parallel(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel) allows them
|
* focuses the group. If there are some focused tests or suites, all of them will be run but nothing else.
|
||||||
* to run in parallel. If there are some focused tests or suites, all of them will be run but nothing else.
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* test.describe.parallel.only('group', () => {
|
|
||||||
* test('runs in parallel 1', async ({ page }) => {
|
|
||||||
* });
|
|
||||||
* test('runs in parallel 2', async ({ page }) => {
|
|
||||||
* });
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Note that parallel tests are executed in separate processes and cannot share any state or global variables. Each of the
|
|
||||||
* parallel tests executes all relevant hooks.
|
|
||||||
* @param title Group title.
|
* @param title Group title.
|
||||||
* @param callback A callback that is run immediately when calling [test.describe.parallel.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel-only).
|
* @param callback A callback that is run immediately when calling [test.describe.parallel.only(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-parallel-only).
|
||||||
* Any tests added in this callback will belong to the group.
|
* Any tests added in this callback will belong to the group.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue