How mandh-jayessh/jrmpw02 works
Project Type and Purpose
• This is a test-automation framework built on Playwright with TypeScript, using the Page Object Model (POM). Its purpose is to run browser-based UI tests against target web pages, drive them via Page classes, feed in test data, and generate reports.
Main Components
a. Playwright Test Runner & Configuration
• playwright.config.ts
• package.json scripts (npm run test)
b. Page Object Model Layer
• pages/*.ts (e.g. alerts_IH.ts, rediff_login.ts, rediff_signup.ts)
c. Test Scripts
• tests/*.spec.ts
d. Test Data
• data/*.json (alert_data.json, rediff_signup_data.json)
e. Browser Engines
• Chromium/Firefox/WebKit (installed by npx playwright install)
f. Reporting
• playwright-report/ index.html + screenshots
g. CI/CD Integration
• .github/workflows/playwright.yml
Relationships and Data Flow
• Test Runner (A) reads playwright.config.ts and invokes tests (B).
• Each test (B) instantiates Page Objects (C), which wrap Playwright’s API.
• Page Objects (C) read from Test Data files (D) to drive form inputs or validations.
• Page Objects issue browser commands to Browser Engines (E).
• Browser Engines execute UI steps and return states/responses back to tests.
• Test Runner captures results and writes reports (F).
• On merge/commit, GitHub Actions (G) pulls the repo, installs deps, runs tests, and publishes reports.
Architectural Patterns
• Layered POM: separation of Test Layer, Page Layer, Data Layer, and Infrastructure Layer.
• CI Pipeline as an external orchestration service.