From 1701da4f1cbbc323b073da5b3b3af300f13d7e99 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 16 Dec 2024 16:37:50 -0800 Subject: [PATCH] revert step.skip --- packages/playwright/src/common/testType.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/playwright/src/common/testType.ts b/packages/playwright/src/common/testType.ts index 41d54e4170..61f9b36824 100644 --- a/packages/playwright/src/common/testType.ts +++ b/packages/playwright/src/common/testType.ts @@ -57,7 +57,6 @@ export class TestTypeImpl { test.slow = wrapFunctionWithLocation(this._modifier.bind(this, 'slow')); test.setTimeout = wrapFunctionWithLocation(this._setTimeout.bind(this)); test.step = this._step.bind(this, 'pass'); - test.step.skip = this._step.bind(this, 'skip'); test.step.fail = this._step.bind(this, 'fail'); test.step.fixme = this._step.bind(this, 'fixme'); test.use = wrapFunctionWithLocation(this._use.bind(this)); @@ -260,11 +259,11 @@ export class TestTypeImpl { suite._use.push({ fixtures, location }); } - async _step(expectation: 'pass'|'fail'|'fixme'|'skip', title: string, body: () => T | Promise, options: {box?: boolean, location?: Location, timeout?: number } = {}): Promise { + async _step(expectation: 'pass'|'fail'|'fixme', title: string, body: () => T | Promise, options: {box?: boolean, location?: Location, timeout?: number } = {}): Promise { const testInfo = currentTestInfo(); if (!testInfo) throw new Error(`test.step() can only be called from a test`); - if (expectation === 'skip' || expectation === 'fixme') + if (expectation === 'fixme') return undefined as T; const step = testInfo._addStep({ category: 'test.step', title, location: options.location, box: options.box }); return await zones.run('stepZone', step, async () => {