https://github.com/cscheffauer/playwright-kata
https://github.com/cscheffauer/playwright-kata
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cscheffauer/playwright-kata
- Owner: cscheffauer
- Created: 2025-03-23T17:44:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-12T16:15:52.000Z (about 1 year ago)
- Last Synced: 2025-10-28T22:48:24.578Z (8 months ago)
- Language: TypeScript
- Size: 1.84 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playwright Kata
## Setup guide
- Install [Git](https://git-scm.com/downloads)
- Install [Node.js](https://nodejs.org/en/download/) (v20.15.1)
- Install [Yarn](https://yarnpkg.com/getting-started/install)
- Clone this repository (see instructions on top)
- Run `yarn` in terminal, at the root of repository
- Run `npx playwright install` in terminal to download all necessary browsers for testing
(in case of failure try running `npx playwright install --with-deps`)
## Verify you are ready for the Kata
- Run `yarn test` in terminal
- Verify that tests are running and the following result is showing up: `8 passed and 8 skipped`
- In case these results are not showing up / something is wrong, please open a Github issue.
## Instructions (during the Kata)
Once in the Kata, follow the instructions [here](https://github.com/cscheffauer/playwright-kata/blob/main/INSTRUCTIONS.md).
## Background
In this repository [fixtures](https://playwright.dev/docs/test-fixtures) and [Page Object Models](https://playwright.dev/docs/pom) are used for abstraction.
- The `mainPage` fixture does automatically navigate to the provided `baseURL` (can be set in test.use) before the actual test code.
- The `mainPage` fixture does automatically close the tab after the test code has been executed.
- To access [page](https://playwright.dev/docs/api/class-page), use `mainPage.page` (mainPage is passed into the test as a argument)
- Accessibility and visual regression utils are in the corresponding Page object models, which can be accessed through `mainPage.accessibility` or `mainPage.visualRegression`
- [@axe-core/playwright](https://playwright.dev/docs/accessibility-testing) is used to scan the page on accessibility issues.
- Visual regression snapshots are automatically generated for LTR, RTL direction and High Contrast mode.