-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add alias for custom fixtures (#192)
* add alias for custom fixtures * fix unit test * add unit test * upd text * 0.10.0-beta-alias * rename alias to test-alias * fix unit test * remove pwCustomFixtureNames
- Loading branch information
1 parent
fe6dcc5
commit 8425cd0
Showing
7 changed files
with
58 additions
and
35 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { test as base } from '@playwright/test'; | ||
import { test } from '@playwright/test'; | ||
|
||
const customTestName = base.extend<{ someFixture: any }>({ | ||
someFixture: async ({}, use) => { | ||
console.log('custom fixture called'); | ||
await use({ name: 'custom fixture name', value: 'custom fixture value' }); | ||
}, | ||
}); | ||
|
||
customTestName('custom test name is parsed', async ({ someFixture }) => { | ||
console.warn(someFixture.name); | ||
console.warn(someFixture.value); | ||
}); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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