# saima-khan01/qe-automation-take-home-exercise architecture

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

- Interactive diagram: https://gitdiagram.com/saima-khan01/qe-automation-take-home-exercise
- Repository: https://github.com/saima-khan01/qe-automation-take-home-exercise
- Video tour (about a minute): https://gitdiagram.com/saima-khan01/qe-automation-take-home-exercise/video

## Overview

This repository is a Playwright-based e-commerce test automation project. Its intended user-to-result flow is to run scenario-driven browser checks across product selection, cart and promotion validation, checkout, and order confirmation. The page objects and Excel reader show several of these capabilities; the test files and JSON scenario loader were not excerpted, so their connections are left unverified rather than inferred. CI execution is part of the project description but is not represented as runtime architecture.

Main entry points: [`tests/ecommerce.spec.ts`](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/tests/ecommerce.spec.ts) (E-commerce scenarios), [`tests/ecommerceExcel.spec.ts`](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/tests/ecommerceExcel.spec.ts) (Excel scenarios), [`test-data/types.ts`](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/test-data/types.ts) (Scenario types), [`pages/CartPage.ts`](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/CartPage.ts) (Cart and promotions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_suite["Test scenarios"]
  node_standard_tests["E-commerce scenarios<br/>[ecommerce.spec.ts]"]
  node_excel_tests["Excel scenarios"]
end

subgraph group_pages["Store interactions"]
  node_product["Product selection<br/>[ProductPage.ts]"]
  node_cart["Cart and promotions<br/>[CartPage.ts]"]
  node_checkout["Checkout form<br/>[CheckoutPage.ts]"]
  node_confirmation["Order confirmation"]
end

subgraph group_data["Scenario data"]
  node_json_data["JSON scenarios<br/>[scenarios.json]"]
  node_excel_data["Excel scenarios"]
  node_scenario_types["Scenario types<br/>[types.ts]"]
  node_excel_reader["Excel reader<br/>[excelReader.ts]"]
end

subgraph group_helpers["Validation helpers"]
  node_money["Money calculations<br/>[money.ts]"]
end

node_runner(("Playwright runner"))

node_runner -.->|"runs"| node_standard_tests
node_runner -.->|"runs"| node_excel_tests
node_standard_tests -.->|"uses"| node_product
node_standard_tests -.->|"uses"| node_cart
node_standard_tests -.->|"uses"| node_checkout
node_standard_tests -.->|"uses"| node_confirmation
node_excel_tests -.->|"loads"| node_excel_reader
node_excel_reader -.->|"reads"| node_excel_data
node_standard_tests -.->|"loads"| node_json_data
node_cart -->|"uses"| node_scenario_types
node_checkout -->|"uses"| node_scenario_types
node_excel_tests -.->|"uses"| node_scenario_types

click node_standard_tests "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/tests/ecommerce.spec.ts"
click node_excel_tests "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/tests/ecommerceExcel.spec.ts"
click node_product "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/ProductPage.ts"
click node_cart "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/CartPage.ts"
click node_checkout "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/CheckoutPage.ts"
click node_confirmation "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/ConfirmationPage.ts"
click node_json_data "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/test-data/scenarios.json"
click node_excel_data "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/test-data/ecommerce_scenarios.xlsx"
click node_scenario_types "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/test-data/types.ts"
click node_excel_reader "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/utils/excelReader.ts"
click node_money "https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/utils/money.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_standard_tests,node_excel_tests toneBlue
class node_product,node_cart,node_checkout,node_confirmation toneAmber
class node_json_data,node_excel_data,node_scenario_types,node_excel_reader toneMint
class node_money toneRose
class node_runner toneIndigo
```

## Components

### Test scenarios

- [E-commerce scenarios](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/tests/ecommerce.spec.ts): `tests/ecommerce.spec.ts`
- [Excel scenarios](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/tests/ecommerceExcel.spec.ts): `tests/ecommerceExcel.spec.ts`

### Store interactions

- [Product selection](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/ProductPage.ts): `pages/ProductPage.ts`
- [Cart and promotions](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/CartPage.ts): `pages/CartPage.ts`
- [Checkout form](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/CheckoutPage.ts): `pages/CheckoutPage.ts`
- [Order confirmation](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/pages/ConfirmationPage.ts): `pages/ConfirmationPage.ts`

### Scenario data

- [JSON scenarios](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/test-data/scenarios.json): `test-data/scenarios.json`
- [Excel scenarios](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/test-data/ecommerce_scenarios.xlsx): `test-data/ecommerce_scenarios.xlsx`
- [Scenario types](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/test-data/types.ts): `test-data/types.ts`
- [Excel reader](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/utils/excelReader.ts): `utils/excelReader.ts`

### Validation helpers

- [Money calculations](https://github.com/saima-khan01/qe-automation-take-home-exercise/blob/master/utils/money.ts): `utils/money.ts`

### Other components

- **Playwright runner**

## Connections

- Playwright runner → E-commerce scenarios: runs
- Playwright runner → Excel scenarios: runs
- E-commerce scenarios → Product selection: uses
- E-commerce scenarios → Cart and promotions: uses
- E-commerce scenarios → Checkout form: uses
- E-commerce scenarios → Order confirmation: uses
- Excel scenarios → Excel reader: loads
- Excel reader → Excel scenarios: reads
- E-commerce scenarios → JSON scenarios: loads
- Cart and promotions → Scenario types: uses (evidence: `pages/CartPage.ts`)
- Checkout form → Scenario types: uses (evidence: `pages/CheckoutPage.ts`)
- Excel scenarios → Scenario types: uses
