This repo is used to demo various testing scenarios with Playwright ðŸŽ, using the official test-runner and scripts authored in TypeScript.
The test.yml GitHub Action workflow is used to:
accessibility - runs accessibility checks against https://playwright.dev/docs/accessibility-testing
android - runs a basic test using Android's WebView.
basic - basic tests to show interactions, element selectors, assertions, upload files, read a response, mock a response, and page object model (POM).
chrome-extension - basic test that gets a handle to the background page of Chrome extension.
drag-and-drop - runs example drag-and-drop test utilizing https://www.w3schools.com/html/html5_draganddrop.asp.
electron - runs a basic test for Electron application, controlling main electron process and working with Electron window.
fixtures - runs example tests utilizing test and worker fixtures.
github-api - uses GitHub API to test creation of a new repo, bug, and feature, then deletion of repo.
oauth - runs oauth tests for LinkedIn, Facebook, and Google, to login to https://courses.ultimateqa.com/users/sign_in.
performance - web performance tests using resource timing API, DevTools, and lighthouse, run against https://fastestwebsite.net
svgomg - End-to-end tests for SVGOMG! site, hosted at https://demo.playwright.dev/svgomg
todomvc - End-to-end tests for ToDoMVC site, hosted at https://demo.playwright.dev/todomvc
visual-comparison - visually compares snapshots with golden screenshots and text content for playwright.dev landing page.
When the above tests are finished, the results are published to GitHub pages:
- testresults.marcusfelling.com/accessibility
- testresults.marcusfelling.com/android
- testresults.marcusfelling.com/basic
- testresults.marcusfelling.com/chrome-extension
- testresults.marcusfelling.com/drag-and-drop
- testresults.marcusfelling.com/electron
- testresults.marcusfelling.com/fixtures
- testresults.marcusfelling.com/github-api
- testresults.marcusfelling.com/oauth
- testresults.marcusfelling.com/performance
- testresults.marcusfelling.com/svgomg
- testresults.marcusfelling.com/todomvc
- testresults.marcusfelling.com/visual-comparison
The baseURL value for most tests is set as a workflow environment variable. This allows flexibility for the URL of the sites tested. By not hardcoding a URL in page.goTo('')
we can simply pass baseURL without changing the test script e.g. test.site.com -> stage.site.com -> prod.site.com
Please open an issue with details.