Playwright + TypeScript automation framework using Page Object Model (POM), JSON test data, and tagged specs.
- Node.js 23+
- npm 11+
- Playwright
1.57.0 - TypeScript
5.7.2
npm install
npx playwright install chromiumnpm test
npm run test:headed
npm run test:smoke
npm run reportPLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac-arm64 is included in npm scripts for Codex CLI compatibility.
- Specs:
*.spec.ts(feature-based) - Pages:
*.page.ts(one class per page) - Tests:
describe("Feature")+test("should do X") - Selectors:
getByRole/getByTestId(data-testconfigured as test id attribute) - Data files:
/data/*.json(no hardcoded credentials/product names in specs)
/pages:BasePage,LoginPage,InventoryPage,CartPage,CheckoutPage/tests/fixtures: shared fixture (loggedInPage)/tests/auth: login + smoke + data-driven auth checks/tests/inventory: add/remove/sort coverage/tests/cart: cart content and cart removal checks/tests/checkout: validation and happy-path checkout
Common tags used in titles:
@smoke@auth@inventory@cart@checkout@regression@formValidation