-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,6 @@ interface TestStepInternal { | |
location?: Location; | ||
} | ||
|
||
type StepOptions = Parameters<TestTypeCommon['step']>[2]; | ||
|
||
// eslint-disable-next-line max-params | ||
export async function runStepWithLocation( | ||
test: TestTypeCommon, | ||
|
@@ -26,8 +24,8 @@ export async function runStepWithLocation( | |
) { | ||
// PW 1.48 introduced official way to run step with location. | ||
if (playwrightVersion >= '1.48.0') { | ||
// use type assertion to avoid TS error in earlier PW versions | ||
return test.step(stepText, body, { location } as StepOptions); | ||
// @ts-expect-error earlier PW versions do not support 3rd argument in test.step | ||
Check failure on line 27 in src/playwright/runStepWithLocation.ts GitHub Actions / test-win (latest)
Check failure on line 27 in src/playwright/runStepWithLocation.ts GitHub Actions / test-win (beta)
Check failure on line 27 in src/playwright/runStepWithLocation.ts GitHub Actions / test (1.48)
Check failure on line 27 in src/playwright/runStepWithLocation.ts GitHub Actions / test (beta)
|
||
return test.step(stepText, body, { location }); | ||
} | ||
|
||
// Since PW 1.43 testInfo._runAsStep was replaced with a more complex logic. | ||
|