A Playwright-based QA test suite that logs into the Swag Labs demo e-commerce site, sorts the inventory by price from low to high, and validates the result.
- Playwright v1.53.1
- JavaScript (ES2023)
- Node.js
- Navigate to site and login
- Sort inventory by price low to high
- Parse and validate that prices are correctly ordered
- Output results to JSON per browser and HTML report
git clone https://github.com/timLP79/e_commerce_test.git
cd e_commerce_test
npm installnpx playwright testnpx playwright show-reportoutput/results-${testInfo.project.name}.json-- item names and prices per browserplaywright-report/-- full HTML test report- Console summary printed after each browser run
--- TEST SUMMARY (chromium) ---
Items found: 6
Sorted low to high: YES
Results saved to output/results-chromium.json
e_commerce_test/
├── tests/
│ ├── login.spec.js # Login and navigation test
│ └── filter.spec.js # Price sort validation test
├── utils/
│ └── login.js # Shared login helper
├── output/ # JSON results (gitignored)
├── playwright-report/ # HTML report
├── playwright.config.js # Playwright configuration
└── README.md
- Email: timpalacios@u.boisestate.edu
- GitHub: @timLP79
- LinkedIn: tim-palacios