Skip to content

Commit 9603226

Browse files
authoredMar 5, 2025
cherry-pick(#35051): docs: update step example (#35054)
1 parent d2e2362 commit 9603226

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
 

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import { test, expect } from '@playwright/test';
99

1010
test('basic test', async ({ page, browserName }) => {
1111
await test.step('check some behavior', async step => {
12-
await step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
12+
step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
1313
// ... rest of the step code
14-
await page.check('input');
1514
});
1615
});
1716
```

‎packages/playwright/types/test.d.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -9590,9 +9590,8 @@ export interface TestInfoError {
95909590
*
95919591
* test('basic test', async ({ page, browserName }) => {
95929592
* await test.step('check some behavior', async step => {
9593-
* await step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
9593+
* step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
95949594
* // ... rest of the step code
9595-
* await page.check('input');
95969595
* });
95979596
* });
95989597
* ```

0 commit comments

Comments
 (0)