Skip to content

Commit

Permalink
cherry-pick(#35051): docs: update step example (#35054)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Mar 5, 2025
1 parent d2e2362 commit 9603226
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions docs/src/test-api/class-teststepinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import { test, expect } from '@playwright/test';

test('basic test', async ({ page, browserName }) => {
await test.step('check some behavior', async step => {
await step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
// ... rest of the step code
await page.check('input');
});
});
```
Expand Down
3 changes: 1 addition & 2 deletions packages/playwright/types/test.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9590,9 +9590,8 @@ export interface TestInfoError {
*
* test('basic test', async ({ page, browserName }) => {
* await test.step('check some behavior', async step => {
* await step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
* step.skip(browserName === 'webkit', 'The feature is not available in WebKit');
* // ... rest of the step code
* await page.check('input');
* });
* });
* ```
Expand Down

0 comments on commit 9603226

Please sign in to comment.