How thulisa-n/playwright-unified-test-suite works
This repository is a Playwright/TypeScript end-to-end and API testing framework, rather than the e-commerce application itself. Its main workflow runs UI suites against SauceDemo across browser projects, with page objects and shared test data supporting functional checks; separate suites cover accessibility and visual baselines. API tests exercise a bundled deterministic mock REST API and validate contracts. The README documents these capabilities, while the sampled excerpts do not show test implementations or fixture wiring, so those relationships are omitted or marked unverified.
Main entry points: playwright.config.ts Playwright projects · login.spec.ts Login suite · products.spec.ts Products suite · cart.spec.ts Cart suite
Components 21
UI testing
- Login suite
tests/ui/login.spec.ts - Products suite
tests/ui/products.spec.ts - Cart suite
tests/ui/cart.spec.ts - Checkout suite
tests/ui/checkout.spec.ts - Menu suite
tests/ui/menu.spec.ts - Login page object
page-objects/LoginPage.ts - Inventory page object
page-objects/InventoryPage.ts - Cart page object
page-objects/CartPage.ts - Checkout page object
page-objects/CheckoutPage.ts - Product detail object
page-objects/ProductDetailPage.ts - Menu page object
page-objects/MenuPage.ts
API testing
- API contracts
tests/api/api.spec.ts - Mock REST API
mock-api/server.mjs
Quality checks
- Visual regression
tests/visual/visual.spec.ts - Accessibility scans
tests/a11y/accessibility.spec.ts
Framework support
- Playwright projects
playwright.config.ts - Reusable fixtures
fixtures/test-fixtures.ts - User test data
data/users.ts - Product test data
data/products.ts
Other components
- Test runner
- SauceDemo
Connections 27
- Test runner → Playwright projects: runs projects
README.md - Playwright projects → Mock REST API: starts server
playwright.config.ts - Playwright projects → Login suite: selects suite
playwright.config.ts - Playwright projects → Products suite: selects suite
playwright.config.ts - Playwright projects → Cart suite: selects suite
playwright.config.ts - Playwright projects → Checkout suite: selects suite
playwright.config.ts - Playwright projects → Menu suite: selects suite
playwright.config.ts - Playwright projects → Visual regression: selects suite
playwright.config.ts - Playwright projects → Accessibility scans: selects suite
playwright.config.ts - Playwright projects → API contracts: selects suite
playwright.config.ts - Login suite → SauceDemo: tests UI
README.md - Products suite → SauceDemo: tests UI
README.md - Cart suite → SauceDemo: tests UI
README.md - Checkout suite → SauceDemo: tests UI
README.md - Menu suite → SauceDemo: tests UI
README.md - Visual regression → SauceDemo: checks baselines
README.md - Accessibility scans → SauceDemo: scans pages
README.md - API contracts → Mock REST API: tests endpoints
README.md - Login suite → Login page object: uses page object
- Products suite → Inventory page object: uses page object
- Products suite → Product detail object: uses page object
- Cart suite → Cart page object: uses page object
- Checkout suite → Checkout page object: uses page object
- Menu suite → Menu page object: uses page object
- Login suite → User test data: uses test data
- Products suite → Product test data: uses test data
- Login suite → Reusable fixtures: may use fixtures