-
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.
- Loading branch information
1 parent
3bb0b86
commit f41c5c4
Showing
2 changed files
with
29 additions
and
1 deletion.
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,28 @@ | ||
--- | ||
'playwright-decorators': minor | ||
--- | ||
|
||
Add `@preview` decorator | ||
|
||
Runs a `@test`(s) or `@suite`(s) in preview (headed browser) mode, simulating user interaction (slowing down each operation by 1000ms). | ||
Tests or suites without the `@preview` decorator will not be excluded. | ||
|
||
```ts | ||
import { suite, test, preview, TestArgs } from 'playwright-decorators'; | ||
|
||
// Preview selected test suite(s) | ||
@preview() // <-- Decorate suite with @preview() | ||
@suite() | ||
class PreviewTestSuite { | ||
} | ||
|
||
// Or preview selected test(s) | ||
@suite() | ||
class TestSuite { | ||
@preview() // <-- Decorate test with @preview() | ||
@test() | ||
async test({ page }: TestArgs) { | ||
// ... | ||
} | ||
} | ||
``` |