File tree 2 files changed +8
-10
lines changed
packages/playwright/types
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ Abort the currently running step and mark it as skipped. Useful for steps that a
90
90
import { test , expect } from ' @playwright/test' ;
91
91
92
92
test (' my test' , async ({ page }) => {
93
- await test .step (' check expectations' , async () => {
94
- test .skip ();
93
+ await test .step (' check expectations' , async step => {
94
+ step .skip ();
95
95
// step body below will not run
96
96
// ...
97
97
});
@@ -109,9 +109,8 @@ Conditionally abort the currently running step and mark it as skipped with an op
109
109
import { test , expect } from ' @playwright/test' ;
110
110
111
111
test (' my test' , async ({ page, isMobile }) => {
112
- await test .step (' check desktop expectations' , async () => {
113
- test .skip (isMobile, ' not present in the mobile layout' );
114
-
112
+ await test .step (' check desktop expectations' , async step => {
113
+ step .skip (isMobile, ' not present in the mobile layout' );
115
114
// step body below will not run
116
115
// ...
117
116
});
Original file line number Diff line number Diff line change @@ -9674,8 +9674,8 @@ export interface TestStepInfo {
9674
9674
* import { test, expect } from '@playwright/test';
9675
9675
*
9676
9676
* test('my test', async ({ page }) => {
9677
- * await test.step('check expectations', async () => {
9678
- * test .skip();
9677
+ * await test.step('check expectations', async step => {
9678
+ * step .skip();
9679
9679
* // step body below will not run
9680
9680
* // ...
9681
9681
* });
@@ -9695,9 +9695,8 @@ export interface TestStepInfo {
9695
9695
* import { test, expect } from '@playwright/test';
9696
9696
*
9697
9697
* test('my test', async ({ page, isMobile }) => {
9698
- * await test.step('check desktop expectations', async () => {
9699
- * test.skip(isMobile, 'not present in the mobile layout');
9700
- *
9698
+ * await test.step('check desktop expectations', async step => {
9699
+ * step.skip(isMobile, 'not present in the mobile layout');
9701
9700
* // step body below will not run
9702
9701
* // ...
9703
9702
* });
You can’t perform that action at this time.
0 commit comments