# vijayangit2026/pw_framework architecture

> Architecture diagram of the GitHub repository vijayangit2026/pw_framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vijayangit2026/pw_framework
- Repository: https://github.com/vijayangit2026/pw_framework

## Overview

This repository is a Playwright end-to-end testing framework for exercising a browser-based shopping and checkout flow. Its page-object layer models login, products, cart, and checkout screens; shared page actions wait for elements before interacting. The sampled hooks reset browser state and capture failure screenshots, while configuration selects an environment URL and browser projects. Tests, fixtures, and cart-page implementation are listed in the tree but were not sampled, so their wiring and the end-to-end sequence cannot be verified from the available evidence.

Main entry points: [`pages/basePage.js`](https://github.com/vijayangit2026/pw_framework/blob/main/pages/basePage.js) (Base page actions), [`Hooks/hooks.js`](https://github.com/vijayangit2026/pw_framework/blob/main/Hooks/hooks.js) (Test hooks), [`playwright.config.js`](https://github.com/vijayangit2026/pw_framework/blob/main/playwright.config.js) (Playwright runner), [`pages/loginPage.js`](https://github.com/vijayangit2026/pw_framework/blob/main/pages/loginPage.js) (Login page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Test orchestration"]
  node_tests["Test scenarios"]
  node_hooks["Test hooks<br/>[hooks.js]"]
  node_fixtures["Browser fixtures<br/>[fixtureFile.js]"]
  node_runner["Playwright runner"]
end

subgraph group_pages["Shopping page objects"]
  node_login["Login page<br/>[loginPage.js]"]
  node_products["Product page<br/>[productPage.js]"]
  node_cart["Cart page<br/>[cartPage.js]"]
  node_checkout["Checkout page<br/>[checkoutPage.js]"]
  node_overview["Order overview"]
  node_complete["Order completion"]
end

subgraph group_support["Shared support"]
  node_environment["Environment config<br/>[configReader.js]"]
  node_base["Base page actions<br/>[basePage.js]"]
  node_wait["Element waits<br/>[waitUtils.js]"]
  node_logger["Run logger<br/>[loggerUtils.js]"]
end

node_hooks -->|"imports"| node_fixtures
node_hooks -->|"logs events"| node_logger
node_runner -->|"loads URL"| node_environment
node_login -->|"extends"| node_base
node_products -->|"extends"| node_base
node_checkout -->|"extends"| node_base
node_overview -->|"extends"| node_base
node_complete -->|"extends"| node_base
node_base -->|"waits via"| node_wait

click node_tests "https://github.com/vijayangit2026/pw_framework/tree/main/tests"
click node_hooks "https://github.com/vijayangit2026/pw_framework/blob/main/Hooks/hooks.js"
click node_fixtures "https://github.com/vijayangit2026/pw_framework/blob/main/fixtures/fixtureFile.js"
click node_environment "https://github.com/vijayangit2026/pw_framework/blob/main/config/configReader.js"
click node_runner "https://github.com/vijayangit2026/pw_framework/blob/main/playwright.config.js"
click node_login "https://github.com/vijayangit2026/pw_framework/blob/main/pages/loginPage.js"
click node_products "https://github.com/vijayangit2026/pw_framework/blob/main/pages/productPage.js"
click node_cart "https://github.com/vijayangit2026/pw_framework/blob/main/pages/cartPage.js"
click node_checkout "https://github.com/vijayangit2026/pw_framework/blob/main/pages/checkoutPage.js"
click node_overview "https://github.com/vijayangit2026/pw_framework/blob/main/pages/checkoutOverviewPage.js"
click node_complete "https://github.com/vijayangit2026/pw_framework/blob/main/pages/checkoutCompletePage.js"
click node_base "https://github.com/vijayangit2026/pw_framework/blob/main/pages/basePage.js"
click node_wait "https://github.com/vijayangit2026/pw_framework/blob/main/utils/waitUtils.js"
click node_logger "https://github.com/vijayangit2026/pw_framework/blob/main/utils/loggerUtils.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tests,node_hooks,node_fixtures,node_runner toneBlue
class node_login,node_products,node_cart,node_checkout,node_overview,node_complete toneAmber
class node_environment,node_base,node_wait,node_logger toneMint
```

## Components

### Test orchestration

- [Test scenarios](https://github.com/vijayangit2026/pw_framework/tree/main/tests): `tests`
- [Test hooks](https://github.com/vijayangit2026/pw_framework/blob/main/Hooks/hooks.js): `Hooks/hooks.js`
- [Browser fixtures](https://github.com/vijayangit2026/pw_framework/blob/main/fixtures/fixtureFile.js): `fixtures/fixtureFile.js`
- [Playwright runner](https://github.com/vijayangit2026/pw_framework/blob/main/playwright.config.js): `playwright.config.js`

### Shopping page objects

- [Login page](https://github.com/vijayangit2026/pw_framework/blob/main/pages/loginPage.js): `pages/loginPage.js`
- [Product page](https://github.com/vijayangit2026/pw_framework/blob/main/pages/productPage.js): `pages/productPage.js`
- [Cart page](https://github.com/vijayangit2026/pw_framework/blob/main/pages/cartPage.js): `pages/cartPage.js`
- [Checkout page](https://github.com/vijayangit2026/pw_framework/blob/main/pages/checkoutPage.js): `pages/checkoutPage.js`
- [Order overview](https://github.com/vijayangit2026/pw_framework/blob/main/pages/checkoutOverviewPage.js): `pages/checkoutOverviewPage.js`
- [Order completion](https://github.com/vijayangit2026/pw_framework/blob/main/pages/checkoutCompletePage.js): `pages/checkoutCompletePage.js`

### Shared support

- [Environment config](https://github.com/vijayangit2026/pw_framework/blob/main/config/configReader.js): `config/configReader.js`
- [Base page actions](https://github.com/vijayangit2026/pw_framework/blob/main/pages/basePage.js): `pages/basePage.js`
- [Element waits](https://github.com/vijayangit2026/pw_framework/blob/main/utils/waitUtils.js): `utils/waitUtils.js`
- [Run logger](https://github.com/vijayangit2026/pw_framework/blob/main/utils/loggerUtils.js): `utils/loggerUtils.js`

## Connections

- Test hooks → Browser fixtures: imports (evidence: `Hooks/hooks.js`)
- Test hooks → Run logger: logs events (evidence: `Hooks/hooks.js`)
- Playwright runner → Environment config: loads URL (evidence: `playwright.config.js`)
- Login page → Base page actions: extends (evidence: `pages/loginPage.js`)
- Product page → Base page actions: extends (evidence: `pages/productPage.js`)
- Checkout page → Base page actions: extends (evidence: `pages/checkoutPage.js`)
- Order overview → Base page actions: extends (evidence: `pages/checkoutOverviewPage.js`)
- Order completion → Base page actions: extends (evidence: `pages/checkoutCompletePage.js`)
- Base page actions → Element waits: waits via (evidence: `pages/basePage.js`)
