playwright 1.64.0 → 1.65.0-alpha-2026-10-08
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/index.js +1 -1
- package/lib/common/index.js.txt +2 -2
- package/lib/runner/index.js +4 -1
- package/lib/runner/index.js.txt +2 -2
- package/lib/worker/workerProcessEntry.js +1 -1
- package/lib/worker/workerProcessEntry.js.txt +2 -2
- package/package.json +2 -2
- package/types/test.d.ts +354 -37
package/lib/common/index.js
CHANGED
|
@@ -2368,7 +2368,7 @@ var TestTypeImpl = class _TestTypeImpl {
|
|
|
2368
2368
|
} else {
|
|
2369
2369
|
if (modifierArgs.length >= 1 && !modifierArgs[0])
|
|
2370
2370
|
return;
|
|
2371
|
-
const description = modifierArgs[1];
|
|
2371
|
+
const description = modifierArgs.length === 1 && typeof modifierArgs[0] === "string" ? modifierArgs[0] : modifierArgs[1];
|
|
2372
2372
|
suite._staticAnnotations.push({ type, description, location });
|
|
2373
2373
|
}
|
|
2374
2374
|
return;
|
package/lib/common/index.js.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# packages/playwright/lib/common/index.js
|
|
2
|
-
# total: 113.
|
|
2
|
+
# total: 113.7 KB
|
|
3
3
|
|
|
4
4
|
## Inlined (20)
|
|
5
5
|
12.5 KB packages/playwright/src/common/config.ts
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
4.9 KB packages/playwright/src/common/suiteUtils.ts
|
|
13
13
|
8.7 KB packages/playwright/src/common/test.ts
|
|
14
14
|
2.0 KB packages/playwright/src/common/testLoader.ts
|
|
15
|
-
|
|
15
|
+
13.0 KB packages/playwright/src/common/testType.ts
|
|
16
16
|
1.4 KB packages/playwright/src/common/validators.ts
|
|
17
17
|
1.3 KB packages/playwright/src/isomorphic/teleReceiver.ts
|
|
18
18
|
7.8 KB packages/playwright/src/transform/compilationCache.ts
|
package/lib/runner/index.js
CHANGED
|
@@ -2587,6 +2587,7 @@ async function createRootSuite(testRun, errors, shouldFilterOnly) {
|
|
|
2587
2587
|
rootSuite._addSuite(buildProjectSuite(project, filteredProjectSuites.get(project)));
|
|
2588
2588
|
}
|
|
2589
2589
|
}
|
|
2590
|
+
testRun.testCountBeforeSharding = rootSuite.allTests().length;
|
|
2590
2591
|
if (config2.config.forbidOnly) {
|
|
2591
2592
|
const onlyTestsAndSuites = rootSuite._getOnlyItems();
|
|
2592
2593
|
if (onlyTestsAndSuites.length > 0) {
|
|
@@ -6456,6 +6457,7 @@ var TestRun = class {
|
|
|
6456
6457
|
this.topLevelProjects = [];
|
|
6457
6458
|
this.hasWorkerErrors = false;
|
|
6458
6459
|
this.failedTestCount = 0;
|
|
6460
|
+
this.testCountBeforeSharding = 0;
|
|
6459
6461
|
this.loadFileFilters = [];
|
|
6460
6462
|
this.preOnlyTestFilters = [];
|
|
6461
6463
|
this.postShardTestFilters = [];
|
|
@@ -6663,7 +6665,8 @@ function createLoadTask(mode, options) {
|
|
|
6663
6665
|
testRun.preOnlyTestFilters.push((test) => changedFiles.has(test.location.file));
|
|
6664
6666
|
}
|
|
6665
6667
|
await createRootSuite(testRun, options.failOnLoadErrors ? errors : softErrors, !!options.filterOnly);
|
|
6666
|
-
|
|
6668
|
+
const testCount = testRun.config.config.shard ? testRun.testCountBeforeSharding : testRun.rootSuite?.allTests().length;
|
|
6669
|
+
if (options.failOnLoadErrors && !testCount && !testRun.options.passWithNoTests && !testRun.options.onlyChanged && !testRun.options.testList && !testRun.options.testListInvert) {
|
|
6667
6670
|
if (testRun.options.locations?.length) {
|
|
6668
6671
|
throw new Error([
|
|
6669
6672
|
`No tests found.`,
|
package/lib/runner/index.js.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# packages/playwright/lib/runner/index.js
|
|
2
|
-
# total: 316.
|
|
2
|
+
# total: 316.7 KB
|
|
3
3
|
|
|
4
4
|
## Inlined (48)
|
|
5
5
|
1.3 KB packages/playwright/src/isomorphic/events.ts
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
2.4 KB packages/playwright/src/runner/reporterTestRun.ts
|
|
43
43
|
1.6 KB packages/playwright/src/runner/sigIntWatcher.ts
|
|
44
44
|
3.5 KB packages/playwright/src/runner/taskRunner.ts
|
|
45
|
-
14.
|
|
45
|
+
14.8 KB packages/playwright/src/runner/tasks.ts
|
|
46
46
|
4.4 KB packages/playwright/src/runner/testGroups.ts
|
|
47
47
|
13.2 KB packages/playwright/src/runner/testRunner.ts
|
|
48
48
|
9.3 KB packages/playwright/src/runner/testServer.ts
|
|
@@ -959,7 +959,7 @@ var TestInfoImpl = class {
|
|
|
959
959
|
}
|
|
960
960
|
if (modifierArgs.length >= 1 && !modifierArgs[0])
|
|
961
961
|
return;
|
|
962
|
-
const description = modifierArgs[1];
|
|
962
|
+
const description = modifierArgs.length === 1 && typeof modifierArgs[0] === "string" ? modifierArgs[0] : modifierArgs[1];
|
|
963
963
|
this.annotations.push({ type, description, location });
|
|
964
964
|
if (type === "slow") {
|
|
965
965
|
this._timeoutManager.slow();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# packages/playwright/lib/worker/workerProcessEntry.js
|
|
2
|
-
# total: 74.
|
|
2
|
+
# total: 74.3 KB
|
|
3
3
|
|
|
4
4
|
## Inlined (8)
|
|
5
5
|
3.7 KB packages/playwright/src/util.ts
|
|
6
6
|
8.7 KB packages/playwright/src/worker/fixtureRunner.ts
|
|
7
|
-
21.
|
|
7
|
+
21.4 KB packages/playwright/src/worker/testInfo.ts
|
|
8
8
|
11.9 KB packages/playwright/src/worker/testTracing.ts
|
|
9
9
|
5.4 KB packages/playwright/src/worker/timeoutManager.ts
|
|
10
10
|
0.3 KB packages/playwright/src/worker/util.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.65.0-alpha-2026-10-08",
|
|
4
4
|
"description": "A high-level API to automate web browsers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"license": "Apache-2.0",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"playwright-core": "1.
|
|
48
|
+
"playwright-core": "1.65.0-alpha-2026-10-08"
|
|
49
49
|
}
|
|
50
50
|
}
|
package/types/test.d.ts
CHANGED
|
@@ -4476,6 +4476,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4476
4476
|
* - `test.skip(condition, description)`
|
|
4477
4477
|
* - `test.skip(callback, description)`
|
|
4478
4478
|
* - `test.skip()`
|
|
4479
|
+
* - `test.skip(description)`
|
|
4479
4480
|
*
|
|
4480
4481
|
* **Usage**
|
|
4481
4482
|
*
|
|
@@ -4519,14 +4520,14 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4519
4520
|
* });
|
|
4520
4521
|
* ```
|
|
4521
4522
|
*
|
|
4522
|
-
* You can also call `test.skip()` without
|
|
4523
|
-
* recommend using `test.skip(title, body)` instead.
|
|
4523
|
+
* You can also call `test.skip()` without a condition inside the test body to always skip the test, optionally with a
|
|
4524
|
+
* `description`. However, we recommend using `test.skip(title, body)` instead.
|
|
4524
4525
|
*
|
|
4525
4526
|
* ```js
|
|
4526
4527
|
* import { test, expect } from '@playwright/test';
|
|
4527
4528
|
*
|
|
4528
4529
|
* test('less readable', async ({ page }) => {
|
|
4529
|
-
* test.skip();
|
|
4530
|
+
* test.skip('Not implemented yet');
|
|
4530
4531
|
* // ...
|
|
4531
4532
|
* });
|
|
4532
4533
|
* ```
|
|
@@ -4557,6 +4558,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4557
4558
|
* - `test.skip(condition, description)`
|
|
4558
4559
|
* - `test.skip(callback, description)`
|
|
4559
4560
|
* - `test.skip()`
|
|
4561
|
+
* - `test.skip(description)`
|
|
4560
4562
|
*
|
|
4561
4563
|
* **Usage**
|
|
4562
4564
|
*
|
|
@@ -4600,14 +4602,14 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4600
4602
|
* });
|
|
4601
4603
|
* ```
|
|
4602
4604
|
*
|
|
4603
|
-
* You can also call `test.skip()` without
|
|
4604
|
-
* recommend using `test.skip(title, body)` instead.
|
|
4605
|
+
* You can also call `test.skip()` without a condition inside the test body to always skip the test, optionally with a
|
|
4606
|
+
* `description`. However, we recommend using `test.skip(title, body)` instead.
|
|
4605
4607
|
*
|
|
4606
4608
|
* ```js
|
|
4607
4609
|
* import { test, expect } from '@playwright/test';
|
|
4608
4610
|
*
|
|
4609
4611
|
* test('less readable', async ({ page }) => {
|
|
4610
|
-
* test.skip();
|
|
4612
|
+
* test.skip('Not implemented yet');
|
|
4611
4613
|
* // ...
|
|
4612
4614
|
* });
|
|
4613
4615
|
* ```
|
|
@@ -4638,6 +4640,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4638
4640
|
* - `test.skip(condition, description)`
|
|
4639
4641
|
* - `test.skip(callback, description)`
|
|
4640
4642
|
* - `test.skip()`
|
|
4643
|
+
* - `test.skip(description)`
|
|
4641
4644
|
*
|
|
4642
4645
|
* **Usage**
|
|
4643
4646
|
*
|
|
@@ -4681,14 +4684,14 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4681
4684
|
* });
|
|
4682
4685
|
* ```
|
|
4683
4686
|
*
|
|
4684
|
-
* You can also call `test.skip()` without
|
|
4685
|
-
* recommend using `test.skip(title, body)` instead.
|
|
4687
|
+
* You can also call `test.skip()` without a condition inside the test body to always skip the test, optionally with a
|
|
4688
|
+
* `description`. However, we recommend using `test.skip(title, body)` instead.
|
|
4686
4689
|
*
|
|
4687
4690
|
* ```js
|
|
4688
4691
|
* import { test, expect } from '@playwright/test';
|
|
4689
4692
|
*
|
|
4690
4693
|
* test('less readable', async ({ page }) => {
|
|
4691
|
-
* test.skip();
|
|
4694
|
+
* test.skip('Not implemented yet');
|
|
4692
4695
|
* // ...
|
|
4693
4696
|
* });
|
|
4694
4697
|
* ```
|
|
@@ -4719,6 +4722,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4719
4722
|
* - `test.skip(condition, description)`
|
|
4720
4723
|
* - `test.skip(callback, description)`
|
|
4721
4724
|
* - `test.skip()`
|
|
4725
|
+
* - `test.skip(description)`
|
|
4722
4726
|
*
|
|
4723
4727
|
* **Usage**
|
|
4724
4728
|
*
|
|
@@ -4762,14 +4766,96 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4762
4766
|
* });
|
|
4763
4767
|
* ```
|
|
4764
4768
|
*
|
|
4765
|
-
* You can also call `test.skip()` without
|
|
4766
|
-
* recommend using `test.skip(title, body)` instead.
|
|
4769
|
+
* You can also call `test.skip()` without a condition inside the test body to always skip the test, optionally with a
|
|
4770
|
+
* `description`. However, we recommend using `test.skip(title, body)` instead.
|
|
4767
4771
|
*
|
|
4768
4772
|
* ```js
|
|
4769
4773
|
* import { test, expect } from '@playwright/test';
|
|
4770
4774
|
*
|
|
4771
4775
|
* test('less readable', async ({ page }) => {
|
|
4772
|
-
* test.skip();
|
|
4776
|
+
* test.skip('Not implemented yet');
|
|
4777
|
+
* // ...
|
|
4778
|
+
* });
|
|
4779
|
+
* ```
|
|
4780
|
+
*
|
|
4781
|
+
* @param title Test title.
|
|
4782
|
+
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
|
|
4783
|
+
* description.
|
|
4784
|
+
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
4785
|
+
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
4786
|
+
* @param condition Test is marked as "skipped" when the condition is `true`.
|
|
4787
|
+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
|
|
4788
|
+
* when the return value is `true`.
|
|
4789
|
+
* @param description Optional description that will be reflected in a test report.
|
|
4790
|
+
*/
|
|
4791
|
+
skip(description: string): void;
|
|
4792
|
+
/**
|
|
4793
|
+
* Skip a test. Playwright will not run the test past the `test.skip()` call.
|
|
4794
|
+
*
|
|
4795
|
+
* Skipped tests are not supposed to be ever run. If you intend to fix the test, use
|
|
4796
|
+
* [test.fixme([title, details, body, condition, callback, description])](https://playwright.dev/docs/api/class-test#test-fixme)
|
|
4797
|
+
* instead.
|
|
4798
|
+
*
|
|
4799
|
+
* To declare a skipped test:
|
|
4800
|
+
* - `test.skip(title, body)`
|
|
4801
|
+
* - `test.skip(title, details, body)`
|
|
4802
|
+
*
|
|
4803
|
+
* To skip a test at runtime:
|
|
4804
|
+
* - `test.skip(condition, description)`
|
|
4805
|
+
* - `test.skip(callback, description)`
|
|
4806
|
+
* - `test.skip()`
|
|
4807
|
+
* - `test.skip(description)`
|
|
4808
|
+
*
|
|
4809
|
+
* **Usage**
|
|
4810
|
+
*
|
|
4811
|
+
* You can declare a skipped test, and Playwright will not run it.
|
|
4812
|
+
*
|
|
4813
|
+
* ```js
|
|
4814
|
+
* import { test, expect } from '@playwright/test';
|
|
4815
|
+
*
|
|
4816
|
+
* test.skip('never run', async ({ page }) => {
|
|
4817
|
+
* // ...
|
|
4818
|
+
* });
|
|
4819
|
+
* ```
|
|
4820
|
+
*
|
|
4821
|
+
* If your test should be skipped in some configurations, but not all, you can skip the test inside the test body
|
|
4822
|
+
* based on some condition. We recommend passing a `description` argument in this case. Playwright will run the test,
|
|
4823
|
+
* but abort it immediately after the `test.skip` call.
|
|
4824
|
+
*
|
|
4825
|
+
* ```js
|
|
4826
|
+
* import { test, expect } from '@playwright/test';
|
|
4827
|
+
*
|
|
4828
|
+
* test('Safari-only test', async ({ page, browserName }) => {
|
|
4829
|
+
* test.skip(browserName !== 'webkit', 'This feature is Safari-only');
|
|
4830
|
+
* // ...
|
|
4831
|
+
* });
|
|
4832
|
+
* ```
|
|
4833
|
+
*
|
|
4834
|
+
* You can skip all tests in a file or
|
|
4835
|
+
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group based
|
|
4836
|
+
* on some condition with a single `test.skip(callback, description)` call.
|
|
4837
|
+
*
|
|
4838
|
+
* ```js
|
|
4839
|
+
* import { test, expect } from '@playwright/test';
|
|
4840
|
+
*
|
|
4841
|
+
* test.skip(({ browserName }) => browserName !== 'webkit', 'Safari-only');
|
|
4842
|
+
*
|
|
4843
|
+
* test('Safari-only test 1', async ({ page }) => {
|
|
4844
|
+
* // ...
|
|
4845
|
+
* });
|
|
4846
|
+
* test('Safari-only test 2', async ({ page }) => {
|
|
4847
|
+
* // ...
|
|
4848
|
+
* });
|
|
4849
|
+
* ```
|
|
4850
|
+
*
|
|
4851
|
+
* You can also call `test.skip()` without a condition inside the test body to always skip the test, optionally with a
|
|
4852
|
+
* `description`. However, we recommend using `test.skip(title, body)` instead.
|
|
4853
|
+
*
|
|
4854
|
+
* ```js
|
|
4855
|
+
* import { test, expect } from '@playwright/test';
|
|
4856
|
+
*
|
|
4857
|
+
* test('less readable', async ({ page }) => {
|
|
4858
|
+
* test.skip('Not implemented yet');
|
|
4773
4859
|
* // ...
|
|
4774
4860
|
* });
|
|
4775
4861
|
* ```
|
|
@@ -4800,6 +4886,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4800
4886
|
* - `test.skip(condition, description)`
|
|
4801
4887
|
* - `test.skip(callback, description)`
|
|
4802
4888
|
* - `test.skip()`
|
|
4889
|
+
* - `test.skip(description)`
|
|
4803
4890
|
*
|
|
4804
4891
|
* **Usage**
|
|
4805
4892
|
*
|
|
@@ -4843,14 +4930,14 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4843
4930
|
* });
|
|
4844
4931
|
* ```
|
|
4845
4932
|
*
|
|
4846
|
-
* You can also call `test.skip()` without
|
|
4847
|
-
* recommend using `test.skip(title, body)` instead.
|
|
4933
|
+
* You can also call `test.skip()` without a condition inside the test body to always skip the test, optionally with a
|
|
4934
|
+
* `description`. However, we recommend using `test.skip(title, body)` instead.
|
|
4848
4935
|
*
|
|
4849
4936
|
* ```js
|
|
4850
4937
|
* import { test, expect } from '@playwright/test';
|
|
4851
4938
|
*
|
|
4852
4939
|
* test('less readable', async ({ page }) => {
|
|
4853
|
-
* test.skip();
|
|
4940
|
+
* test.skip('Not implemented yet');
|
|
4854
4941
|
* // ...
|
|
4855
4942
|
* });
|
|
4856
4943
|
* ```
|
|
@@ -4879,6 +4966,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4879
4966
|
* - `test.fixme(condition, description)`
|
|
4880
4967
|
* - `test.fixme(callback, description)`
|
|
4881
4968
|
* - `test.fixme()`
|
|
4969
|
+
* - `test.fixme(description)`
|
|
4882
4970
|
*
|
|
4883
4971
|
* **Usage**
|
|
4884
4972
|
*
|
|
@@ -4922,8 +5010,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4922
5010
|
* });
|
|
4923
5011
|
* ```
|
|
4924
5012
|
*
|
|
4925
|
-
* You can also call `test.fixme()` without
|
|
4926
|
-
* recommend using `test.fixme(title, body)` instead.
|
|
5013
|
+
* You can also call `test.fixme()` without a condition inside the test body to always mark the test as "fixme",
|
|
5014
|
+
* optionally with a `description`. We recommend using `test.fixme(title, body)` instead.
|
|
4927
5015
|
*
|
|
4928
5016
|
* ```js
|
|
4929
5017
|
* import { test, expect } from '@playwright/test';
|
|
@@ -4957,6 +5045,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
4957
5045
|
* - `test.fixme(condition, description)`
|
|
4958
5046
|
* - `test.fixme(callback, description)`
|
|
4959
5047
|
* - `test.fixme()`
|
|
5048
|
+
* - `test.fixme(description)`
|
|
4960
5049
|
*
|
|
4961
5050
|
* **Usage**
|
|
4962
5051
|
*
|
|
@@ -5000,8 +5089,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5000
5089
|
* });
|
|
5001
5090
|
* ```
|
|
5002
5091
|
*
|
|
5003
|
-
* You can also call `test.fixme()` without
|
|
5004
|
-
* recommend using `test.fixme(title, body)` instead.
|
|
5092
|
+
* You can also call `test.fixme()` without a condition inside the test body to always mark the test as "fixme",
|
|
5093
|
+
* optionally with a `description`. We recommend using `test.fixme(title, body)` instead.
|
|
5005
5094
|
*
|
|
5006
5095
|
* ```js
|
|
5007
5096
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5035,6 +5124,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5035
5124
|
* - `test.fixme(condition, description)`
|
|
5036
5125
|
* - `test.fixme(callback, description)`
|
|
5037
5126
|
* - `test.fixme()`
|
|
5127
|
+
* - `test.fixme(description)`
|
|
5038
5128
|
*
|
|
5039
5129
|
* **Usage**
|
|
5040
5130
|
*
|
|
@@ -5078,8 +5168,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5078
5168
|
* });
|
|
5079
5169
|
* ```
|
|
5080
5170
|
*
|
|
5081
|
-
* You can also call `test.fixme()` without
|
|
5082
|
-
* recommend using `test.fixme(title, body)` instead.
|
|
5171
|
+
* You can also call `test.fixme()` without a condition inside the test body to always mark the test as "fixme",
|
|
5172
|
+
* optionally with a `description`. We recommend using `test.fixme(title, body)` instead.
|
|
5083
5173
|
*
|
|
5084
5174
|
* ```js
|
|
5085
5175
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5113,6 +5203,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5113
5203
|
* - `test.fixme(condition, description)`
|
|
5114
5204
|
* - `test.fixme(callback, description)`
|
|
5115
5205
|
* - `test.fixme()`
|
|
5206
|
+
* - `test.fixme(description)`
|
|
5116
5207
|
*
|
|
5117
5208
|
* **Usage**
|
|
5118
5209
|
*
|
|
@@ -5156,8 +5247,87 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5156
5247
|
* });
|
|
5157
5248
|
* ```
|
|
5158
5249
|
*
|
|
5159
|
-
* You can also call `test.fixme()` without
|
|
5160
|
-
* recommend using `test.fixme(title, body)` instead.
|
|
5250
|
+
* You can also call `test.fixme()` without a condition inside the test body to always mark the test as "fixme",
|
|
5251
|
+
* optionally with a `description`. We recommend using `test.fixme(title, body)` instead.
|
|
5252
|
+
*
|
|
5253
|
+
* ```js
|
|
5254
|
+
* import { test, expect } from '@playwright/test';
|
|
5255
|
+
*
|
|
5256
|
+
* test('less readable', async ({ page }) => {
|
|
5257
|
+
* test.fixme();
|
|
5258
|
+
* // ...
|
|
5259
|
+
* });
|
|
5260
|
+
* ```
|
|
5261
|
+
*
|
|
5262
|
+
* @param title Test title.
|
|
5263
|
+
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
|
|
5264
|
+
* description.
|
|
5265
|
+
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
5266
|
+
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
5267
|
+
* @param condition Test is marked as "fixme" when the condition is `true`.
|
|
5268
|
+
* @param callback A function that returns whether to mark as "fixme", based on test fixtures. Test or tests are marked as "fixme"
|
|
5269
|
+
* when the return value is `true`.
|
|
5270
|
+
* @param description Optional description that will be reflected in a test report.
|
|
5271
|
+
*/
|
|
5272
|
+
fixme(description: string): void;
|
|
5273
|
+
/**
|
|
5274
|
+
* Mark a test as "fixme", with the intention to fix it. Playwright will not run the test past the `test.fixme()`
|
|
5275
|
+
* call.
|
|
5276
|
+
*
|
|
5277
|
+
* To declare a "fixme" test:
|
|
5278
|
+
* - `test.fixme(title, body)`
|
|
5279
|
+
* - `test.fixme(title, details, body)`
|
|
5280
|
+
*
|
|
5281
|
+
* To annotate test as "fixme" at runtime:
|
|
5282
|
+
* - `test.fixme(condition, description)`
|
|
5283
|
+
* - `test.fixme(callback, description)`
|
|
5284
|
+
* - `test.fixme()`
|
|
5285
|
+
* - `test.fixme(description)`
|
|
5286
|
+
*
|
|
5287
|
+
* **Usage**
|
|
5288
|
+
*
|
|
5289
|
+
* You can declare a test as to be fixed, and Playwright will not run it.
|
|
5290
|
+
*
|
|
5291
|
+
* ```js
|
|
5292
|
+
* import { test, expect } from '@playwright/test';
|
|
5293
|
+
*
|
|
5294
|
+
* test.fixme('to be fixed', async ({ page }) => {
|
|
5295
|
+
* // ...
|
|
5296
|
+
* });
|
|
5297
|
+
* ```
|
|
5298
|
+
*
|
|
5299
|
+
* If your test should be fixed in some configurations, but not all, you can mark the test as "fixme" inside the test
|
|
5300
|
+
* body based on some condition. We recommend passing a `description` argument in this case. Playwright will run the
|
|
5301
|
+
* test, but abort it immediately after the `test.fixme` call.
|
|
5302
|
+
*
|
|
5303
|
+
* ```js
|
|
5304
|
+
* import { test, expect } from '@playwright/test';
|
|
5305
|
+
*
|
|
5306
|
+
* test('to be fixed in Safari', async ({ page, browserName }) => {
|
|
5307
|
+
* test.fixme(browserName === 'webkit', 'This feature breaks in Safari for some reason');
|
|
5308
|
+
* // ...
|
|
5309
|
+
* });
|
|
5310
|
+
* ```
|
|
5311
|
+
*
|
|
5312
|
+
* You can mark all tests in a file or
|
|
5313
|
+
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group as
|
|
5314
|
+
* "fixme" based on some condition with a single `test.fixme(callback, description)` call.
|
|
5315
|
+
*
|
|
5316
|
+
* ```js
|
|
5317
|
+
* import { test, expect } from '@playwright/test';
|
|
5318
|
+
*
|
|
5319
|
+
* test.fixme(({ browserName }) => browserName === 'webkit', 'Should figure out the issue');
|
|
5320
|
+
*
|
|
5321
|
+
* test('to be fixed in Safari 1', async ({ page }) => {
|
|
5322
|
+
* // ...
|
|
5323
|
+
* });
|
|
5324
|
+
* test('to be fixed in Safari 2', async ({ page }) => {
|
|
5325
|
+
* // ...
|
|
5326
|
+
* });
|
|
5327
|
+
* ```
|
|
5328
|
+
*
|
|
5329
|
+
* You can also call `test.fixme()` without a condition inside the test body to always mark the test as "fixme",
|
|
5330
|
+
* optionally with a `description`. We recommend using `test.fixme(title, body)` instead.
|
|
5161
5331
|
*
|
|
5162
5332
|
* ```js
|
|
5163
5333
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5191,6 +5361,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5191
5361
|
* - `test.fixme(condition, description)`
|
|
5192
5362
|
* - `test.fixme(callback, description)`
|
|
5193
5363
|
* - `test.fixme()`
|
|
5364
|
+
* - `test.fixme(description)`
|
|
5194
5365
|
*
|
|
5195
5366
|
* **Usage**
|
|
5196
5367
|
*
|
|
@@ -5234,8 +5405,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5234
5405
|
* });
|
|
5235
5406
|
* ```
|
|
5236
5407
|
*
|
|
5237
|
-
* You can also call `test.fixme()` without
|
|
5238
|
-
* recommend using `test.fixme(title, body)` instead.
|
|
5408
|
+
* You can also call `test.fixme()` without a condition inside the test body to always mark the test as "fixme",
|
|
5409
|
+
* optionally with a `description`. We recommend using `test.fixme(title, body)` instead.
|
|
5239
5410
|
*
|
|
5240
5411
|
* ```js
|
|
5241
5412
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5270,6 +5441,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5270
5441
|
* - `test.fail(condition, description)`
|
|
5271
5442
|
* - `test.fail(callback, description)`
|
|
5272
5443
|
* - `test.fail()`
|
|
5444
|
+
* - `test.fail(description)`
|
|
5273
5445
|
*
|
|
5274
5446
|
* **Usage**
|
|
5275
5447
|
*
|
|
@@ -5312,8 +5484,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5312
5484
|
* });
|
|
5313
5485
|
* ```
|
|
5314
5486
|
*
|
|
5315
|
-
* You can also call `test.fail()` without
|
|
5316
|
-
* recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5487
|
+
* You can also call `test.fail()` without a condition inside the test body to always mark the test as failed,
|
|
5488
|
+
* optionally with a `description`. We recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5317
5489
|
*
|
|
5318
5490
|
* ```js
|
|
5319
5491
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5347,6 +5519,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5347
5519
|
* - `test.fail(condition, description)`
|
|
5348
5520
|
* - `test.fail(callback, description)`
|
|
5349
5521
|
* - `test.fail()`
|
|
5522
|
+
* - `test.fail(description)`
|
|
5350
5523
|
*
|
|
5351
5524
|
* **Usage**
|
|
5352
5525
|
*
|
|
@@ -5389,8 +5562,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5389
5562
|
* });
|
|
5390
5563
|
* ```
|
|
5391
5564
|
*
|
|
5392
|
-
* You can also call `test.fail()` without
|
|
5393
|
-
* recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5565
|
+
* You can also call `test.fail()` without a condition inside the test body to always mark the test as failed,
|
|
5566
|
+
* optionally with a `description`. We recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5394
5567
|
*
|
|
5395
5568
|
* ```js
|
|
5396
5569
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5424,6 +5597,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5424
5597
|
* - `test.fail(condition, description)`
|
|
5425
5598
|
* - `test.fail(callback, description)`
|
|
5426
5599
|
* - `test.fail()`
|
|
5600
|
+
* - `test.fail(description)`
|
|
5427
5601
|
*
|
|
5428
5602
|
* **Usage**
|
|
5429
5603
|
*
|
|
@@ -5466,8 +5640,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5466
5640
|
* });
|
|
5467
5641
|
* ```
|
|
5468
5642
|
*
|
|
5469
|
-
* You can also call `test.fail()` without
|
|
5470
|
-
* recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5643
|
+
* You can also call `test.fail()` without a condition inside the test body to always mark the test as failed,
|
|
5644
|
+
* optionally with a `description`. We recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5471
5645
|
*
|
|
5472
5646
|
* ```js
|
|
5473
5647
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5501,6 +5675,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5501
5675
|
* - `test.fail(condition, description)`
|
|
5502
5676
|
* - `test.fail(callback, description)`
|
|
5503
5677
|
* - `test.fail()`
|
|
5678
|
+
* - `test.fail(description)`
|
|
5504
5679
|
*
|
|
5505
5680
|
* **Usage**
|
|
5506
5681
|
*
|
|
@@ -5543,8 +5718,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5543
5718
|
* });
|
|
5544
5719
|
* ```
|
|
5545
5720
|
*
|
|
5546
|
-
* You can also call `test.fail()` without
|
|
5547
|
-
* recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5721
|
+
* You can also call `test.fail()` without a condition inside the test body to always mark the test as failed,
|
|
5722
|
+
* optionally with a `description`. We recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5548
5723
|
*
|
|
5549
5724
|
* ```js
|
|
5550
5725
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5578,6 +5753,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5578
5753
|
* - `test.fail(condition, description)`
|
|
5579
5754
|
* - `test.fail(callback, description)`
|
|
5580
5755
|
* - `test.fail()`
|
|
5756
|
+
* - `test.fail(description)`
|
|
5581
5757
|
*
|
|
5582
5758
|
* **Usage**
|
|
5583
5759
|
*
|
|
@@ -5620,8 +5796,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5620
5796
|
* });
|
|
5621
5797
|
* ```
|
|
5622
5798
|
*
|
|
5623
|
-
* You can also call `test.fail()` without
|
|
5624
|
-
* recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5799
|
+
* You can also call `test.fail()` without a condition inside the test body to always mark the test as failed,
|
|
5800
|
+
* optionally with a `description`. We recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5625
5801
|
*
|
|
5626
5802
|
* ```js
|
|
5627
5803
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5655,6 +5831,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5655
5831
|
* - `test.fail(condition, description)`
|
|
5656
5832
|
* - `test.fail(callback, description)`
|
|
5657
5833
|
* - `test.fail()`
|
|
5834
|
+
* - `test.fail(description)`
|
|
5658
5835
|
*
|
|
5659
5836
|
* **Usage**
|
|
5660
5837
|
*
|
|
@@ -5697,8 +5874,8 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5697
5874
|
* });
|
|
5698
5875
|
* ```
|
|
5699
5876
|
*
|
|
5700
|
-
* You can also call `test.fail()` without
|
|
5701
|
-
* recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5877
|
+
* You can also call `test.fail()` without a condition inside the test body to always mark the test as failed,
|
|
5878
|
+
* optionally with a `description`. We recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5702
5879
|
*
|
|
5703
5880
|
* ```js
|
|
5704
5881
|
* import { test, expect } from '@playwright/test';
|
|
@@ -5720,6 +5897,84 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5720
5897
|
* @param description Optional description that will be reflected in a test report.
|
|
5721
5898
|
*/
|
|
5722
5899
|
(): void;
|
|
5900
|
+
/**
|
|
5901
|
+
* Marks a test as "should fail". Playwright runs this test and ensures that it is actually failing. This is useful
|
|
5902
|
+
* for documentation purposes to acknowledge that some functionality is broken until it is fixed.
|
|
5903
|
+
*
|
|
5904
|
+
* To declare a "failing" test:
|
|
5905
|
+
* - `test.fail(title, body)`
|
|
5906
|
+
* - `test.fail(title, details, body)`
|
|
5907
|
+
*
|
|
5908
|
+
* To annotate test as "failing" at runtime:
|
|
5909
|
+
* - `test.fail(condition, description)`
|
|
5910
|
+
* - `test.fail(callback, description)`
|
|
5911
|
+
* - `test.fail()`
|
|
5912
|
+
* - `test.fail(description)`
|
|
5913
|
+
*
|
|
5914
|
+
* **Usage**
|
|
5915
|
+
*
|
|
5916
|
+
* You can declare a test as failing, so that Playwright ensures it actually fails.
|
|
5917
|
+
*
|
|
5918
|
+
* ```js
|
|
5919
|
+
* import { test, expect } from '@playwright/test';
|
|
5920
|
+
*
|
|
5921
|
+
* test.fail('not yet ready', async ({ page }) => {
|
|
5922
|
+
* // ...
|
|
5923
|
+
* });
|
|
5924
|
+
* ```
|
|
5925
|
+
*
|
|
5926
|
+
* If your test fails in some configurations, but not all, you can mark the test as failing inside the test body based
|
|
5927
|
+
* on some condition. We recommend passing a `description` argument in this case.
|
|
5928
|
+
*
|
|
5929
|
+
* ```js
|
|
5930
|
+
* import { test, expect } from '@playwright/test';
|
|
5931
|
+
*
|
|
5932
|
+
* test('fail in WebKit', async ({ page, browserName }) => {
|
|
5933
|
+
* test.fail(browserName === 'webkit', 'This feature is not implemented for Mac yet');
|
|
5934
|
+
* // ...
|
|
5935
|
+
* });
|
|
5936
|
+
* ```
|
|
5937
|
+
*
|
|
5938
|
+
* You can mark all tests in a file or
|
|
5939
|
+
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group as
|
|
5940
|
+
* "should fail" based on some condition with a single `test.fail(callback, description)` call.
|
|
5941
|
+
*
|
|
5942
|
+
* ```js
|
|
5943
|
+
* import { test, expect } from '@playwright/test';
|
|
5944
|
+
*
|
|
5945
|
+
* test.fail(({ browserName }) => browserName === 'webkit', 'not implemented yet');
|
|
5946
|
+
*
|
|
5947
|
+
* test('fail in WebKit 1', async ({ page }) => {
|
|
5948
|
+
* // ...
|
|
5949
|
+
* });
|
|
5950
|
+
* test('fail in WebKit 2', async ({ page }) => {
|
|
5951
|
+
* // ...
|
|
5952
|
+
* });
|
|
5953
|
+
* ```
|
|
5954
|
+
*
|
|
5955
|
+
* You can also call `test.fail()` without a condition inside the test body to always mark the test as failed,
|
|
5956
|
+
* optionally with a `description`. We recommend declaring a failing test with `test.fail(title, body)` instead.
|
|
5957
|
+
*
|
|
5958
|
+
* ```js
|
|
5959
|
+
* import { test, expect } from '@playwright/test';
|
|
5960
|
+
*
|
|
5961
|
+
* test('less readable', async ({ page }) => {
|
|
5962
|
+
* test.fail();
|
|
5963
|
+
* // ...
|
|
5964
|
+
* });
|
|
5965
|
+
* ```
|
|
5966
|
+
*
|
|
5967
|
+
* @param title Test title.
|
|
5968
|
+
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
|
|
5969
|
+
* description.
|
|
5970
|
+
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
|
5971
|
+
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
|
5972
|
+
* @param condition Test is marked as "should fail" when the condition is `true`.
|
|
5973
|
+
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
|
|
5974
|
+
* "should fail" when the return value is `true`.
|
|
5975
|
+
* @param description Optional description that will be reflected in a test report.
|
|
5976
|
+
*/
|
|
5977
|
+
(description: string): void;
|
|
5723
5978
|
|
|
5724
5979
|
/**
|
|
5725
5980
|
* You can use `test.fail.only` to focus on a specific test that is expected to fail. This is particularly useful when
|
|
@@ -5813,6 +6068,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5813
6068
|
* cannot be used in a `beforeAll` or `afterAll` hook. Use
|
|
5814
6069
|
* [test.setTimeout(timeout)](https://playwright.dev/docs/api/class-test#test-set-timeout) instead.
|
|
5815
6070
|
* - `test.slow()`
|
|
6071
|
+
* - `test.slow(description)`
|
|
5816
6072
|
* - `test.slow(condition, description)`
|
|
5817
6073
|
* - `test.slow(callback, description)`
|
|
5818
6074
|
*
|
|
@@ -5871,6 +6127,66 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5871
6127
|
* cannot be used in a `beforeAll` or `afterAll` hook. Use
|
|
5872
6128
|
* [test.setTimeout(timeout)](https://playwright.dev/docs/api/class-test#test-set-timeout) instead.
|
|
5873
6129
|
* - `test.slow()`
|
|
6130
|
+
* - `test.slow(description)`
|
|
6131
|
+
* - `test.slow(condition, description)`
|
|
6132
|
+
* - `test.slow(callback, description)`
|
|
6133
|
+
*
|
|
6134
|
+
* **Usage**
|
|
6135
|
+
*
|
|
6136
|
+
* You can mark a test as slow by calling `test.slow()` inside the test body.
|
|
6137
|
+
*
|
|
6138
|
+
* ```js
|
|
6139
|
+
* import { test, expect } from '@playwright/test';
|
|
6140
|
+
*
|
|
6141
|
+
* test('slow test', async ({ page }) => {
|
|
6142
|
+
* test.slow();
|
|
6143
|
+
* // ...
|
|
6144
|
+
* });
|
|
6145
|
+
* ```
|
|
6146
|
+
*
|
|
6147
|
+
* If your test is slow in some configurations, but not all, you can mark it as slow based on a condition. We
|
|
6148
|
+
* recommend passing a `description` argument in this case.
|
|
6149
|
+
*
|
|
6150
|
+
* ```js
|
|
6151
|
+
* import { test, expect } from '@playwright/test';
|
|
6152
|
+
*
|
|
6153
|
+
* test('slow in Safari', async ({ page, browserName }) => {
|
|
6154
|
+
* test.slow(browserName === 'webkit', 'This feature is slow in Safari');
|
|
6155
|
+
* // ...
|
|
6156
|
+
* });
|
|
6157
|
+
* ```
|
|
6158
|
+
*
|
|
6159
|
+
* You can mark all tests in a file or
|
|
6160
|
+
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group as
|
|
6161
|
+
* "slow" based on some condition by passing a callback.
|
|
6162
|
+
*
|
|
6163
|
+
* ```js
|
|
6164
|
+
* import { test, expect } from '@playwright/test';
|
|
6165
|
+
*
|
|
6166
|
+
* test.slow(({ browserName }) => browserName === 'webkit', 'all tests are slow in Safari');
|
|
6167
|
+
*
|
|
6168
|
+
* test('slow in Safari 1', async ({ page }) => {
|
|
6169
|
+
* // ...
|
|
6170
|
+
* });
|
|
6171
|
+
* test('fail in Safari 2', async ({ page }) => {
|
|
6172
|
+
* // ...
|
|
6173
|
+
* });
|
|
6174
|
+
* ```
|
|
6175
|
+
*
|
|
6176
|
+
* @param condition Test is marked as "slow" when the condition is `true`.
|
|
6177
|
+
* @param callback A function that returns whether to mark as "slow", based on test fixtures. Test or tests are marked as "slow" when
|
|
6178
|
+
* the return value is `true`.
|
|
6179
|
+
* @param description Optional description that will be reflected in a test report.
|
|
6180
|
+
*/
|
|
6181
|
+
slow(description: string): void;
|
|
6182
|
+
/**
|
|
6183
|
+
* Marks a test as "slow". Slow test will be given triple the default timeout.
|
|
6184
|
+
*
|
|
6185
|
+
* Note that [test.slow([condition, callback, description])](https://playwright.dev/docs/api/class-test#test-slow)
|
|
6186
|
+
* cannot be used in a `beforeAll` or `afterAll` hook. Use
|
|
6187
|
+
* [test.setTimeout(timeout)](https://playwright.dev/docs/api/class-test#test-set-timeout) instead.
|
|
6188
|
+
* - `test.slow()`
|
|
6189
|
+
* - `test.slow(description)`
|
|
5874
6190
|
* - `test.slow(condition, description)`
|
|
5875
6191
|
* - `test.slow(callback, description)`
|
|
5876
6192
|
*
|
|
@@ -5929,6 +6245,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
|
|
|
5929
6245
|
* cannot be used in a `beforeAll` or `afterAll` hook. Use
|
|
5930
6246
|
* [test.setTimeout(timeout)](https://playwright.dev/docs/api/class-test#test-set-timeout) instead.
|
|
5931
6247
|
* - `test.slow()`
|
|
6248
|
+
* - `test.slow(description)`
|
|
5932
6249
|
* - `test.slow(condition, description)`
|
|
5933
6250
|
* - `test.slow(callback, description)`
|
|
5934
6251
|
*
|