End-to-end test automation framework built with Playwright and TypeScript using the Page Object Model (POM).
This project is a Playwright end-to-end automation test suite developed for the TestarsQuarter Playwright.JS Cohort Capstone Project.
The framework validates critical user journeys on the SauceDemo application, including authentication, product interactions, product sorting, cart management, and checkout functionality.
Application Under Test (AUT):
- Playwright
- TypeScript
- Node.js
- GitHub Actions (CI/CD)
- Page Object Model (POM)
playwright-saucedemo-capstone
│
├── .github
│ └── workflows
│ └── playwright.yml
│
├── e2e
│ └── ui
│ └── Capstone
│ ├── login.spec.ts
│ ├── products.spec.ts
│ └── checkout.spec.ts
│
├── pages
│ ├── LoginPage.ts
│ ├── InventoryPage.ts
│ └── CheckoutPage.ts
│
├── utils
│ └── test-data
│ └── users.json
│
├── playwright.config.ts
├── .env.example
├── README.md
└── .gitignore
- Valid Login
- Invalid Login
- Add Product To Cart
- Sort Products Low To High
- Complete Checkout Flow
- Checkout Validation (Missing First Name)
Clone the repository:
git clone https://github.com/Jevmis/playwright-saucedemo-capstone.gitNavigate into the project:
cd playwright-saucedemo-capstoneInstall dependencies:
npm installInstall Playwright browsers:
npx playwright installCreate a .env file in the project root.
Example:
BASE_URL=https://www.saucedemo.com
STANDARD_USERNAME=standard_user
STANDARD_PASSWORD=secret_sauce
INVALID_USERNAME=locked_out_user
INVALID_PASSWORD=wrong_passwordAlternatively, copy the provided .env.example file and update the values as needed.
Run all tests:
npx playwright testRun login tests only:
npx playwright test login.spec.tsRun product tests only:
npx playwright test products.spec.tsRun checkout tests only:
npx playwright test checkout.spec.tsRun tests in headed mode:
npx playwright test --headedGenerate and open the Playwright HTML report:
npx playwright show-reportScreenshots, traces, and execution reports are automatically generated for failed test executions.
GitHub Actions is configured to automatically:
- Install project dependencies
- Install Playwright browsers
- Execute the test suite
- Generate and upload Playwright reports
The workflow runs automatically on:
- Push events
- Pull Requests
This framework follows the Page Object Model (POM) design pattern to improve maintainability, readability, scalability, and reusability of test code.
Michael Jackson Ndueso
QA Engineer | Computer Engineer
QA Engineer | Computer Engineer
🌐 Portfolio: https://michaeljndueso.is-a.dev
💼 LinkedIn: https://linkedin.com/in/michaeljndueso
💻 GitHub: https://github.com/Jevmis
📧 Email: Michaeljndueso@outlook.com
Playwright.JS Cohort 2026 – TestarsQuarter Initiative

