-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: TS support improvements * docs: adjust readme to latest changes * chore: adjust examples to latest changes * chore: run tsc in build step * chore: generate changeset * chore: generate changelog using `@changesets/changelog-github` * chore: rephrase changesets
- Loading branch information
1 parent
7398cc2
commit 8ba55c6
Showing
38 changed files
with
283 additions
and
140 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
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,22 @@ | ||
--- | ||
'playwright-decorators': minor | ||
--- | ||
|
||
|
||
Enhanced TypeScript support: | ||
|
||
- constrained the `@suite` decorator to class contexts only. | ||
- constrained the `@test` decorator to class method context only. Type check of test method arguments. | ||
- exported the `TestArgs` type to provide validity within test methods. | ||
|
||
```ts | ||
import { suite, test, TestArgs } from 'playwright-decorators'; | ||
|
||
@suite() | ||
class ExampleSuite { | ||
@test() | ||
async exampleTest({ page }: TestArgs) { // <- TestArgs ensures correct types of arguments | ||
// ... | ||
} | ||
} | ||
``` |
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 |
---|---|---|
|
@@ -33,4 +33,5 @@ jobs: | |
run: | | ||
cd examples | ||
npx playwright install chromium | ||
npm run build | ||
npm t |
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
Oops, something went wrong.