Skip to content

Commit 6c23a74

Browse files
msorensmsorens-styramxschmitt
authored
docs: fix copy/paste error from test.fail (microsoft#36737)
Co-authored-by: Michael Sorens <[email protected]> Co-authored-by: Max Schmitt <[email protected]>
1 parent de9fde3 commit 6c23a74

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

docs/src/test-api/class-test.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ test('Safari-only test 2', async ({ page }) => {
14741474
});
14751475
```
14761476

1477-
You can also call `test.skip()` without arguments inside the test body to always mark the test as failed. We recommend using `test.skip(title, body)` instead.
1477+
You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we recommend using `test.skip(title, body)` instead.
14781478

14791479
```js
14801480
import { test, expect } from '@playwright/test';
@@ -1511,13 +1511,13 @@ Test body that takes one or two arguments: an object with fixtures and optional
15111511
* since: v1.10
15121512
- `condition` ?<[boolean]>
15131513

1514-
Test is marked as "should fail" when the condition is `true`.
1514+
Test is marked as "skipped" when the condition is `true`.
15151515

15161516
### param: Test.skip.callback
15171517
* since: v1.10
15181518
- `callback` ?<[function]\([Fixtures]\):[boolean]>
15191519

1520-
A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as "should fail" when the return value is `true`.
1520+
A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped" when the return value is `true`.
15211521

15221522
### param: Test.skip.description
15231523
* since: v1.10

packages/playwright/types/test.d.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4186,7 +4186,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
41864186
* });
41874187
* ```
41884188
*
4189-
* You can also call `test.skip()` without arguments inside the test body to always mark the test as failed. We
4189+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
41904190
* recommend using `test.skip(title, body)` instead.
41914191
*
41924192
* ```js
@@ -4203,9 +4203,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
42034203
* description.
42044204
* @param body Test body that takes one or two arguments: an object with fixtures and optional
42054205
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
4206-
* @param condition Test is marked as "should fail" when the condition is `true`.
4207-
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
4208-
* "should fail" when the return value is `true`.
4206+
* @param condition Test is marked as "skipped" when the condition is `true`.
4207+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
4208+
* when the return value is `true`.
42094209
* @param description Optional description that will be reflected in a test report.
42104210
*/
42114211
skip(title: string, body: TestBody<TestArgs & WorkerArgs>): void;
@@ -4267,7 +4267,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
42674267
* });
42684268
* ```
42694269
*
4270-
* You can also call `test.skip()` without arguments inside the test body to always mark the test as failed. We
4270+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
42714271
* recommend using `test.skip(title, body)` instead.
42724272
*
42734273
* ```js
@@ -4284,9 +4284,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
42844284
* description.
42854285
* @param body Test body that takes one or two arguments: an object with fixtures and optional
42864286
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
4287-
* @param condition Test is marked as "should fail" when the condition is `true`.
4288-
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
4289-
* "should fail" when the return value is `true`.
4287+
* @param condition Test is marked as "skipped" when the condition is `true`.
4288+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
4289+
* when the return value is `true`.
42904290
* @param description Optional description that will be reflected in a test report.
42914291
*/
42924292
skip(title: string, details: TestDetails, body: TestBody<TestArgs & WorkerArgs>): void;
@@ -4348,7 +4348,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
43484348
* });
43494349
* ```
43504350
*
4351-
* You can also call `test.skip()` without arguments inside the test body to always mark the test as failed. We
4351+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
43524352
* recommend using `test.skip(title, body)` instead.
43534353
*
43544354
* ```js
@@ -4365,9 +4365,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
43654365
* description.
43664366
* @param body Test body that takes one or two arguments: an object with fixtures and optional
43674367
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
4368-
* @param condition Test is marked as "should fail" when the condition is `true`.
4369-
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
4370-
* "should fail" when the return value is `true`.
4368+
* @param condition Test is marked as "skipped" when the condition is `true`.
4369+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
4370+
* when the return value is `true`.
43714371
* @param description Optional description that will be reflected in a test report.
43724372
*/
43734373
skip(): void;
@@ -4429,7 +4429,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
44294429
* });
44304430
* ```
44314431
*
4432-
* You can also call `test.skip()` without arguments inside the test body to always mark the test as failed. We
4432+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
44334433
* recommend using `test.skip(title, body)` instead.
44344434
*
44354435
* ```js
@@ -4446,9 +4446,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
44464446
* description.
44474447
* @param body Test body that takes one or two arguments: an object with fixtures and optional
44484448
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
4449-
* @param condition Test is marked as "should fail" when the condition is `true`.
4450-
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
4451-
* "should fail" when the return value is `true`.
4449+
* @param condition Test is marked as "skipped" when the condition is `true`.
4450+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
4451+
* when the return value is `true`.
44524452
* @param description Optional description that will be reflected in a test report.
44534453
*/
44544454
skip(condition: boolean, description?: string): void;
@@ -4510,7 +4510,7 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
45104510
* });
45114511
* ```
45124512
*
4513-
* You can also call `test.skip()` without arguments inside the test body to always mark the test as failed. We
4513+
* You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we
45144514
* recommend using `test.skip(title, body)` instead.
45154515
*
45164516
* ```js
@@ -4527,9 +4527,9 @@ export interface TestType<TestArgs extends {}, WorkerArgs extends {}> {
45274527
* description.
45284528
* @param body Test body that takes one or two arguments: an object with fixtures and optional
45294529
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
4530-
* @param condition Test is marked as "should fail" when the condition is `true`.
4531-
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
4532-
* "should fail" when the return value is `true`.
4530+
* @param condition Test is marked as "skipped" when the condition is `true`.
4531+
* @param callback A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped"
4532+
* when the return value is `true`.
45334533
* @param description Optional description that will be reflected in a test report.
45344534
*/
45354535
skip(callback: ConditionBody<TestArgs & WorkerArgs>, description?: string): void;

0 commit comments

Comments
 (0)