End-to-end test automation suite for taqelah.sg β a modern fashion e-commerce platform. Demonstrates enterprise-grade testing practices with UI flows, mobile testing, visual regression, API CRUD operations, and advanced mocking patterns.
β
643+ automated tests across 8 focused test categories
β
Multi-browser coverage β Chromium, Firefox, WebKit
β
Mobile-first testing β iPhone 13, Pixel 5, tablet, widescreen viewports
β
Visual regression testing β Screenshot-based validation across devices
β
API testing β Real CRUD operations + network mocking patterns
β
CI/CD integration β GitHub Actions with 3-way parallel sharding
β
Production-ready patterns β Page Object Model, fixtures, global setup/teardown
- Framework: Playwright (TypeScript)
- Testing: Jest/Playwright Test
- Infrastructure: Docker (isolated API environment)
- CI/CD: GitHub Actions
- Code Quality: ESLint, TypeScript strict mode
| Category | Coverage | Scope |
|---|---|---|
| Functional | Auth, search, cart, checkout | Desktop browsers (Chrome, Firefox, Safari) |
| Mobile | Navigation, negative flows, E2E checkout | iPhone 13, Pixel 5 β full mobile workflow |
| Smoke | Critical-path login validation | Cross-browser (Chromium, Firefox, WebKit) |
| Regression | Full E2E happy path | Chromium only β comprehensive flow validation |
| Visual | Screenshot regression | Desktop, mobile, tablet, widescreen β pixel-perfect |
| API Inventory | Real CRUD operations | Direct Docker API on port 8080 (isolated) |
| API Mocking | Request interception patterns | Network mock demos on separate port (isolated) |
| Advanced Patterns | Stateful mocks, conditional responses | Complex mock scenarios & request manipulation |
βββββββββββββββββββββββββββββββββββββββββββββββ
β Live UI Tests (taqelah.sg) β
β Functional β’ Mobile β’ Smoke β’ Regression β
βββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββ
β API Tests (Docker - Port 8080, Isolated) β
β Real CRUD β’ No live DB connection β
βββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββ
β Mocking Tests (Isolated Port, No Server) β
β Playwright.route() β’ Network interceptionβ
βββββββββββββββββββββββββββββββββββββββββββββββ
- Node.js 18+
- Docker (required for
api-localtests only)
# Clone and install dependencies
npm ci
# Install Playwright browsers and dependencies
npx playwright install --with-deps# For API local testing, ensure Docker is running
docker --version
# Verify Node.js version
node --version # Should be 18+npm testnpm run test:smoke # Quick smoke tests
npm run test:functional # Functional flows
npm run test:regression # Full E2E regression
npm run test:mobile # Mobile-specific tests
npm run test:visual # Visual regression tests# Real API (Docker required)
npx playwright test --project=api-local
# Mocked API (no server needed)
npx playwright test --project=api-mockingnpm run test:debug # Playwright Inspector
npm run test:ui # Playwright UI Mode (interactive)
npm run report # View HTML test report# Run visual tests
npm run test:visual
# Update snapshots after intentional UI changes
npm run test:visual:updateAll UI tests follow the Page Object pattern for maintainability and reusability:
fixtures/ # Reusable test setup & pre-conditions
test-data/ # Hardcoded test data (no backend DB)
βββ checkout-scenarios.json
βββ products.csv
βββ users.json
tests/
βββ pages/ # Page Objects (POM)
β βββ BasePage.ts
β βββ LoginPage.ts
β βββ ShopPage.ts
β βββ CartPage.ts
β βββ index.ts
βββ api-inventory/ # Real API CRUD tests (Docker isolated)
βββ api-mocking/ # Network mocking patterns & request interception
βββ functional/ # UI flows (auth, search, cart, checkout)
βββ mobile/ # Mobile-specific tests (iPhone 13, Pixel 5)
βββ regression/ # Full E2E happy path validation
βββ smoke/ # Critical-path login checks
βββ visual/ # Screenshot regression tests
Real API: Direct calls to Docker-isolated REST API for genuine CRUD testing
Mocked API: Playwright page.route() for deterministic, backend-independent testing
global-setup.ts: Runs once before all tests β launches browser, logs in asladiesuser, saves authenticated session to.auth/taqelah-user.jsonglobal-teardown.ts: Runs after all tests β preserves auth file for debugging (deletion commented out)- Test Usage: Tests load pre-authenticated state via
test.use({ storageState: '.auth/taqelah-user.json' })or viaplaywright.config.tssettings
visual-fixture.tsβstablePagefixture: Auto-waits fornetworkidle, fonts, and all images before taking screenshotsworker-fixture.tsβuniqueEmailfixture: Generates worker-scoped unique email for each test execution
test-data/users.jsonβ Test user accounts with credentials, expected roles, and assigned promo codestest-data/checkout-scenarios.jsonβ Checkout flow test scenarios with hardcoded customer datatest-data/products.csvβ Product search terms and expected results (parsed withcsv-parse)
GitHub Actions workflow runs on every push and pull request:
- β 3-way sharding β tests distributed across 3 parallel jobs for speed
- β Cross-browser β Chromium, Firefox, WebKit in parallel
- β Artifact uploads β HTML reports, screenshots, videos (on failure)
- βοΈ API local tests excluded β require local Docker (manual testing)
Note: API tests run locally only; CI focuses on UI and mocking patterns.
| Metric | Count |
|---|---|
| Total Tests | 50+ |
| Test Files | 13 |
| Coverage Categories | 8 |
| Supported Browsers | 3 |
| Mobile Devices | 2 |
| Desktop Viewports | 4 |
- Globally configured fixtures for reusable page contexts
- Playwright config with retry logic and timeout management
- Automatic screenshot/video capture on failures
- Console log & network request monitoring
- Stateful mocks β simulate full CRUD with in-memory data
- Conditional responses β validate request data and return context-aware responses
- Request interception β capture, modify, and track API calls
- Network simulation β test slow responses, failures, and edge cases
- Responsive design validation across viewports
- Touch interaction testing
- Mobile-specific navigation flows
- Device orientation handling
This is a portfolio project showcasing test automation best practices. For feedback or suggestions, feel free to reach out.
Building this comprehensive test suite reinforced key skills in:
- Test Architecture β organizing tests by concern and criticality
- Playwright Mastery β real API testing, mocking, and advanced patterns
- CI/CD Integration β GitHub Actions parallelization and artifact management
- Test Isolation β data cleanup, fixture management, environment separation
- Problem Solving β debugging flaky tests, handling async operations, managing test state
Built on foundations from: Playwright Agentic AI workshop module
This framework originated from Playwright baseline workshop code and has been significantly expanded, refactored, and enhanced into a production-ready testing framework using Playwright and enterprise-grade best practices.
Special thanks to: Syam Sasi for creating the foundational workshop content and for championing this project with the testing community.
This project is licensed under the MIT License. See the LICENSE file for details.
Status: β
Project Complete β Ready for production-like workflows
Last Updated: April 2026