GithubHelp home page GithubHelp logo

jfgreffier / playwright-component-demos Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 53 KB

Playwright Component Testing demos

License: MIT License

JavaScript 7.03% HTML 7.32% TypeScript 59.15% CSS 26.51%

playwright-component-demos's Introduction

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

playwright-component-demos's People

Contributors

jfgreffier avatar

Stargazers

Thomas Bassetto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.