# jeevanl16/my-qa-assignment architecture

> Architecture diagram of the GitHub repository jeevanl16/my-qa-assignment, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jeevanl16/my-qa-assignment
- Repository: https://github.com/jeevanl16/my-qa-assignment

## Overview

This repository is a Playwright QA suite for SauceDemo’s login/cart UI and ReqRes’s users API. A test run dispatches UI scenarios through page objects to the shop, while API scenarios use Playwright’s request fixture directly; both validate results with assertions. The README documents these workflows and the shared test data. Test source excerpts were not provided, so suite-to-page-object and API-request relationships below rely on the README; the graph does not infer unshown implementation details.

Main entry points: [`tests/ui`](https://github.com/jeevanl16/my-qa-assignment/tree/main/tests/ui) (Login and cart tests), [`pages/LoginPage.ts`](https://github.com/jeevanl16/my-qa-assignment/blob/main/pages/LoginPage.ts) (Login page object), [`pages/InventoryPage.ts`](https://github.com/jeevanl16/my-qa-assignment/blob/main/pages/InventoryPage.ts) (Inventory page object), [`tests/api/users.spec.ts`](https://github.com/jeevanl16/my-qa-assignment/blob/main/tests/api/users.spec.ts) (Users API tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_playwright["Playwright runner"]
  node_runner_config["Runner config"]
end

subgraph group_ui["Shop UI scenarios"]
  node_ui_tests["Login and cart tests"]
  node_login_page["Login page object<br/>[LoginPage.ts]"]
  node_inventory_page["Inventory page object<br/>[InventoryPage.ts]"]
  node_test_data["Shared test data<br/>[test-data.ts]"]
  node_saucedemo["SauceDemo shop"]
end

subgraph group_api["Users API scenarios"]
  node_api_tests["Users API tests<br/>[users.spec.ts]"]
  node_reqres["ReqRes API"]
end

node_engineer(("Test operator"))

node_engineer -->|"runs tests"| node_playwright
node_playwright -->|"loads config"| node_runner_config
node_playwright -->|"runs scenarios"| node_ui_tests
node_playwright -->|"runs scenarios"| node_api_tests
node_ui_tests -->|"uses page object"| node_login_page
node_ui_tests -->|"uses page object"| node_inventory_page
node_login_page -->|"reads URLs"| node_test_data
node_login_page -->|"drives login"| node_saucedemo
node_inventory_page -->|"drives cart"| node_saucedemo
node_api_tests -->|"sends requests"| node_reqres

click node_runner_config "https://github.com/jeevanl16/my-qa-assignment/blob/main/playwright.config.ts"
click node_ui_tests "https://github.com/jeevanl16/my-qa-assignment/tree/main/tests/ui"
click node_login_page "https://github.com/jeevanl16/my-qa-assignment/blob/main/pages/LoginPage.ts"
click node_inventory_page "https://github.com/jeevanl16/my-qa-assignment/blob/main/pages/InventoryPage.ts"
click node_test_data "https://github.com/jeevanl16/my-qa-assignment/blob/main/tests/test-data.ts"
click node_api_tests "https://github.com/jeevanl16/my-qa-assignment/blob/main/tests/api/users.spec.ts"

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_playwright,node_runner_config toneBlue
class node_ui_tests,node_login_page,node_inventory_page,node_test_data,node_saucedemo toneAmber
class node_api_tests,node_reqres toneMint
class node_engineer toneIndigo
```

## Components

### Test execution

- **Playwright runner**
- [Runner config](https://github.com/jeevanl16/my-qa-assignment/blob/main/playwright.config.ts): `playwright.config.ts`

### Shop UI scenarios

- [Login and cart tests](https://github.com/jeevanl16/my-qa-assignment/tree/main/tests/ui): `tests/ui`
- [Login page object](https://github.com/jeevanl16/my-qa-assignment/blob/main/pages/LoginPage.ts): `pages/LoginPage.ts`
- [Inventory page object](https://github.com/jeevanl16/my-qa-assignment/blob/main/pages/InventoryPage.ts): `pages/InventoryPage.ts`
- [Shared test data](https://github.com/jeevanl16/my-qa-assignment/blob/main/tests/test-data.ts): `tests/test-data.ts`
- **SauceDemo shop**

### Users API scenarios

- [Users API tests](https://github.com/jeevanl16/my-qa-assignment/blob/main/tests/api/users.spec.ts): `tests/api/users.spec.ts`
- **ReqRes API**

### Other components

- **Test operator**

## Connections

- Test operator → Playwright runner: runs tests (evidence: `README.md`)
- Playwright runner → Runner config: loads config (evidence: `playwright.config.ts`)
- Playwright runner → Login and cart tests: runs scenarios (evidence: `README.md`)
- Playwright runner → Users API tests: runs scenarios (evidence: `README.md`)
- Login and cart tests → Login page object: uses page object (evidence: `README.md`)
- Login and cart tests → Inventory page object: uses page object (evidence: `README.md`)
- Login page object → Shared test data: reads URLs (evidence: `pages/LoginPage.ts`)
- Login page object → SauceDemo shop: drives login (evidence: `README.md`)
- Inventory page object → SauceDemo shop: drives cart (evidence: `README.md`)
- Users API tests → ReqRes API: sends requests (evidence: `README.md`)
