Overview
This repository is a practical Playwright + TypeScript learning project built around demoqa.com.
It is used to explore:
-
Page Object Model (POM)
-
data-driven testing
-
environment-based execution
-
GitHub Actions CI
-
GitHub Pages publishing for reports and docs
Highlights
-
12 Playwright spec files covering key DemoQA flows
-
one
@sanityexample test in each spec file -
pageObjects/as the active Page Object Model directory -
shared helpers in
utils/ -
reusable navigation metadata in
data/navigationSections.ts -
generated local docs via AsciiDoc
-
GitHub Actions workflow that runs sanity first, then full regression if sanity passes, stores report history, and publishes docs
Local Usage
Install dependencies:
corepack enable
corepack prepare pnpm@10.9.0 --activate
corepack pnpm install
corepack pnpm exec playwright install
Run tests in dev:
corepack pnpm run test:dev
Run tests in e2e:
corepack pnpm run test:e2e
Open Playwright UI mode for dev:
corepack pnpm run test:ui:dev
Run one spec in dev:
corepack pnpm run test:spec:dev -- tests/example.spec.ts
Open Playwright UI mode for one spec in dev:
corepack pnpm run test:ui:spec:dev -- tests/example.spec.ts
Build local docs:
corepack pnpm run docs:build
Preview local docs:
corepack pnpm run docs:preview
Show the Playwright HTML report:
corepack pnpm run show-report
Test Coverage
| Area | Spec File | Notes |
|---|---|---|
Login |
|
Positive and negative login scenarios with data-driven coverage |
Registration |
|
Registration flow coverage |
Text Box |
|
Form field interaction and validation checks |
Check Box |
|
Current DemoQA tree structure and result-message validation |
Radio Button |
|
Selection-state validation |
Buttons |
|
Click, double-click, and right-click behavior |
Links |
|
Link behavior checks |
Alerts |
|
Dialog and alert coverage |
Web Tables |
|
CRUD-style table workflows and search coverage |
Broken Links / Images |
|
Valid and broken state checks aligned to current site behavior |
Navigation |
|
Sidebar and direct-link navigation patterns |
Book Store |
|
Book Store and related user flow coverage |
Documentation Map
CI-generated reports and published docs are available at GitHub Pages.
Notes
This project is intentionally educational. The goal is not only to run tests, but also to keep the repo understandable, reusable, and easy to evolve over time.
The CI workflow uses @sanity as an example tag for a small gate stage before the full suite. It demonstrates test tagging and staged execution.