GitXplorerGitXplorer
j

playwright-component-demos

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
e3ebf1bcc055de02f430367f32ad9d80b9b085e0

feat: snippets

jjfgreffier committed 9 months ago
Verified
9b366148a55f6f98c72b89249172f72c7a39d211

refacto: simplify Counter.spec.tsx

jjfgreffier committed 9 months ago
Unverified
104859dc1b4adc840ddbcacb8951a15e025804d8

feat: introduce (buggy) common CSS

jjfgreffier committed 9 months ago
Unverified
c14f078be4549ab87f8c1b50cd7362524365553b

chore: short timeout for TDD

jjfgreffier committed 9 months ago
Unverified
a65c81130077dec7a5ecb5b7161c8a722c1ed01c

chore: nice viewport

jjfgreffier committed 9 months ago
Unverified
af9d43e00ddfeb86954ae54ae413fda650b05f77

chore: 'test:watch' script

jjfgreffier committed 9 months ago

README

The README file for this repository.

Playwright Component Testing demos

Official documentation

Demo 1 - First Playwright component test

Demo1.spec.tsx

Demo1-annotated.spec.tsx

Very similar to Testing Library example, it shows that you are probably familiar with Playwright !

Demo 2 - Live-coding

Let's code a counter with the help of Playwright VSCode extension. We'll see Locators, web-first assertions, step by step debugging, and screenshots !

Counter.spec.tsx

Watch mode

CLI watch mode is not documented. If you want it to be publicly available, please upvote this GitHub issue

It's almost fast enough for TDD !

PWTEST_WATCH=1 npm run test
set PWTEST_WATCH=1
npm run test
$env:PWTEST_WATCH=1
npm run test

Alternatives are the VSCode extension and UI mode.

Demo 3 - Trace viewer

https://trace.playwright.dev/?trace=https://demo.playwright.dev/reports/todomvc/data/cb0fa77ebd9487a5c899f3ae65a7ffdbac681182.zip