# nisha8393/automation-exercise architecture

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

- Interactive diagram: https://gitdiagram.com/nisha8393/automation-exercise
- Repository: https://github.com/nisha8393/automation-exercise

## Overview

This repository is a Playwright end-to-end test suite for automationexercise.com, organized around page objects and fixtures. Users run smoke, regression, accessibility, or purchase-journey tests against the site; the suite also supports saved authentication and test-data generation. Reporting and manual-case coverage are separate suite capabilities. The README documents suite categories and fixture use; sampled source confirms helper and reporting relationships. Individual test-to-page-object calls were not sampled, so those links are shown only at the documented fixture boundary.

Main entry points: [`fixtures/base.js`](https://github.com/nisha8393/automation-exercise/blob/main/fixtures/base.js) (Page fixtures), [`tests/smoke`](https://github.com/nisha8393/automation-exercise/tree/main/tests/smoke) (Smoke checks), [`tests/regression`](https://github.com/nisha8393/automation-exercise/tree/main/tests/regression) (Regression tests), [`tests/e2e/purchaseFlow.spec.js`](https://github.com/nisha8393/automation-exercise/blob/main/tests/e2e/purchaseFlow.spec.js) (Purchase journey)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_smoke["Smoke checks"]
  node_regression["Regression tests"]
  node_a11y["Accessibility scans"]
  node_purchase["Purchase journey"]
  node_authsetup["Auth setup<br/>[auth.setup.js]"]
  node_config["Playwright config"]
end

subgraph group_pages["Page objects"]
  node_poms["Page objects"]
  node_cartpage["Cart page<br/>[viewCart.page.js]"]
  node_checkoutpage["Checkout page<br/>[checkout.page.js]"]
  node_productpage["Product pages<br/>[product.page.js]"]
  node_registerpage["Registration page<br/>[register.page.js]"]
end

subgraph group_support["Test support"]
  node_fixtures["Page fixtures<br/>[base.js]"]
  node_generator["Test data<br/>[dataGenerator.js]"]
  node_registration["Registration helper"]
  node_carthelper["Cart cleanup<br/>[cart.helper.js]"]
  node_authstate["Saved auth state<br/>[authState.js]"]
end

subgraph group_reports["Coverage and reporting"]
  node_excelreport["Run report"]
  node_piechart["Report chart<br/>[pieChart.js]"]
  node_coverage["Case coverage<br/>[coverage.js]"]
  node_reportutils["Report utilities<br/>[reportUtils.js]"]
end

node_engineer(("Test runner"))
node_site["Automation Exercise"]

node_engineer -->|"runs"| node_smoke
node_engineer -->|"runs"| node_regression
node_engineer -->|"runs"| node_a11y
node_engineer -->|"runs"| node_purchase
node_smoke -->|"checks UI"| node_site
node_regression -->|"tests features"| node_site
node_a11y -->|"scans pages"| node_site
node_purchase -->|"orders product"| node_site
node_config -->|"runs setup"| node_authsetup
node_config -->|"registers reporter"| node_excelreport
node_smoke -->|"uses shared"| node_fixtures
node_regression -->|"uses isolated"| node_fixtures
node_purchase -->|"uses isolated"| node_fixtures
node_fixtures -->|"exposes"| node_poms
node_registration -->|"generates data"| node_generator
node_registration -->|"fills account"| node_registerpage
node_carthelper -->|"cleans cart"| node_cartpage
node_excelreport -->|"renders chart"| node_piechart
node_coverage -->|"uses helpers"| node_reportutils
node_coverage -->|"reads case data"| node_reportutils

click node_smoke "https://github.com/nisha8393/automation-exercise/tree/main/tests/smoke"
click node_regression "https://github.com/nisha8393/automation-exercise/tree/main/tests/regression"
click node_a11y "https://github.com/nisha8393/automation-exercise/blob/main/tests/a11y/accessibility.spec.js"
click node_purchase "https://github.com/nisha8393/automation-exercise/blob/main/tests/e2e/purchaseFlow.spec.js"
click node_authsetup "https://github.com/nisha8393/automation-exercise/blob/main/tests/auth.setup.js"
click node_fixtures "https://github.com/nisha8393/automation-exercise/blob/main/fixtures/base.js"
click node_poms "https://github.com/nisha8393/automation-exercise/tree/main/pages"
click node_cartpage "https://github.com/nisha8393/automation-exercise/blob/main/pages/viewCart.page.js"
click node_checkoutpage "https://github.com/nisha8393/automation-exercise/blob/main/pages/checkout.page.js"
click node_productpage "https://github.com/nisha8393/automation-exercise/blob/main/pages/product.page.js"
click node_registerpage "https://github.com/nisha8393/automation-exercise/blob/main/pages/register.page.js"
click node_generator "https://github.com/nisha8393/automation-exercise/blob/main/utils/helper/dataGenerator.js"
click node_registration "https://github.com/nisha8393/automation-exercise/blob/main/utils/helper/registration.helper.js"
click node_carthelper "https://github.com/nisha8393/automation-exercise/blob/main/utils/helper/cart.helper.js"
click node_authstate "https://github.com/nisha8393/automation-exercise/blob/main/utils/authState.js"
click node_excelreport "https://github.com/nisha8393/automation-exercise/blob/main/scripts/generateExcelReport.js"
click node_piechart "https://github.com/nisha8393/automation-exercise/blob/main/scripts/pieChart.js"
click node_coverage "https://github.com/nisha8393/automation-exercise/blob/main/scripts/coverage.js"
click node_reportutils "https://github.com/nisha8393/automation-exercise/blob/main/scripts/reportUtils.js"
click node_config "https://github.com/nisha8393/automation-exercise/blob/main/playwright.config.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_smoke,node_regression,node_a11y,node_purchase,node_authsetup,node_config toneBlue
class node_poms,node_cartpage,node_checkoutpage,node_productpage,node_registerpage toneAmber
class node_fixtures,node_generator,node_registration,node_carthelper,node_authstate toneMint
class node_excelreport,node_piechart,node_coverage,node_reportutils toneRose
class node_engineer,node_site toneIndigo
```

## Components

### Test execution

- [Smoke checks](https://github.com/nisha8393/automation-exercise/tree/main/tests/smoke): `tests/smoke`
- [Regression tests](https://github.com/nisha8393/automation-exercise/tree/main/tests/regression): `tests/regression`
- [Accessibility scans](https://github.com/nisha8393/automation-exercise/blob/main/tests/a11y/accessibility.spec.js): `tests/a11y/accessibility.spec.js`
- [Purchase journey](https://github.com/nisha8393/automation-exercise/blob/main/tests/e2e/purchaseFlow.spec.js): `tests/e2e/purchaseFlow.spec.js`
- [Auth setup](https://github.com/nisha8393/automation-exercise/blob/main/tests/auth.setup.js): `tests/auth.setup.js`
- [Playwright config](https://github.com/nisha8393/automation-exercise/blob/main/playwright.config.js): `playwright.config.js`

### Page objects

- [Page objects](https://github.com/nisha8393/automation-exercise/tree/main/pages): `pages`
- [Cart page](https://github.com/nisha8393/automation-exercise/blob/main/pages/viewCart.page.js): `pages/viewCart.page.js`
- [Checkout page](https://github.com/nisha8393/automation-exercise/blob/main/pages/checkout.page.js): `pages/checkout.page.js`
- [Product pages](https://github.com/nisha8393/automation-exercise/blob/main/pages/product.page.js): `pages/product.page.js`
- [Registration page](https://github.com/nisha8393/automation-exercise/blob/main/pages/register.page.js): `pages/register.page.js`

### Test support

- [Page fixtures](https://github.com/nisha8393/automation-exercise/blob/main/fixtures/base.js): `fixtures/base.js`
- [Test data](https://github.com/nisha8393/automation-exercise/blob/main/utils/helper/dataGenerator.js): `utils/helper/dataGenerator.js`
- [Registration helper](https://github.com/nisha8393/automation-exercise/blob/main/utils/helper/registration.helper.js): `utils/helper/registration.helper.js`
- [Cart cleanup](https://github.com/nisha8393/automation-exercise/blob/main/utils/helper/cart.helper.js): `utils/helper/cart.helper.js`
- [Saved auth state](https://github.com/nisha8393/automation-exercise/blob/main/utils/authState.js): `utils/authState.js`

### Coverage and reporting

- [Run report](https://github.com/nisha8393/automation-exercise/blob/main/scripts/generateExcelReport.js): `scripts/generateExcelReport.js`
- [Report chart](https://github.com/nisha8393/automation-exercise/blob/main/scripts/pieChart.js): `scripts/pieChart.js`
- [Case coverage](https://github.com/nisha8393/automation-exercise/blob/main/scripts/coverage.js): `scripts/coverage.js`
- [Report utilities](https://github.com/nisha8393/automation-exercise/blob/main/scripts/reportUtils.js): `scripts/reportUtils.js`

### Other components

- **Test runner**
- **Automation Exercise**

## Connections

- Test runner → Smoke checks: runs (evidence: `README.md`)
- Test runner → Regression tests: runs (evidence: `README.md`)
- Test runner → Accessibility scans: runs (evidence: `README.md`)
- Test runner → Purchase journey: runs (evidence: `README.md`)
- Smoke checks → Automation Exercise: checks UI (evidence: `README.md`)
- Regression tests → Automation Exercise: tests features (evidence: `README.md`)
- Accessibility scans → Automation Exercise: scans pages (evidence: `README.md`)
- Purchase journey → Automation Exercise: orders product (evidence: `README.md`)
- Playwright config → Auth setup: runs setup (evidence: `playwright.config.js`)
- Playwright config → Run report: registers reporter (evidence: `playwright.config.js`)
- Smoke checks → Page fixtures: uses shared (evidence: `README.md`)
- Regression tests → Page fixtures: uses isolated (evidence: `README.md`)
- Purchase journey → Page fixtures: uses isolated (evidence: `README.md`)
- Page fixtures → Page objects: exposes (evidence: `README.md`)
- Registration helper → Test data: generates data (evidence: `utils/helper/registration.helper.js`)
- Registration helper → Registration page: fills account (evidence: `utils/helper/registration.helper.js`)
- Cart cleanup → Cart page: cleans cart (evidence: `utils/helper/cart.helper.js`)
- Run report → Report chart: renders chart (evidence: `scripts/generateExcelReport.js`)
- Case coverage → Report utilities: uses helpers (evidence: `scripts/coverage.js`)
- Case coverage → Report utilities: reads case data (evidence: `scripts/coverage.js`)
