# hasanazeerkhan/automationexercise architecture

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

- Interactive diagram: https://gitdiagram.com/hasanazeerkhan/automationexercise
- Repository: https://github.com/hasanazeerkhan/automationexercise

## Overview

This is a Playwright automation framework for the Automation Exercise website. Its main user-to-result workflow is to run tests through reusable page fixtures, perform page-level actions across account, catalog, cart, checkout, and payment stages, then assert the resulting UI state. The graph also preserves contact, navigation, scenario, and authentication-setup capabilities documented in the README. Relationships involving unsampled test files and fixtures are based on README descriptions; source excerpts show page-object behavior and their shared base class.

Main entry points: [`src/fixtures/Page.fixtures.js`](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/fixtures/Page.fixtures.js) (Page fixtures), [`src/pages/Base.page.js`](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Base.page.js) (Base page), [`src/pages/Contact.page.js`](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Contact.page.js) (Contact form), [`tests/modules`](https://github.com/hasanazeerkhan/automationexercise/tree/master/tests/modules) (Feature tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_runner(("Playwright runner"))
  node_feature_tests["Feature tests"]
  node_scenario_tests["Scenario tests"]
  node_e2e_tests["End-to-end tests"]
  node_auth_setup["Authentication setup<br/>[auth.setup.js]"]
  node_fixtures["Page fixtures<br/>[Page.fixtures.js]"]
  node_browser_state["Stored browser state"]
end

subgraph group_pages["Page objects"]
  node_base_page["Base page<br/>[Base.page.js]"]
  node_navigation["Navigation<br/>[Navigation.Tab.js]"]
  node_home["Home page<br/>[Home.page.js]"]
  node_login["Login<br/>[Login.page.js]"]
  node_signup["Signup<br/>[Signup.page.js]"]
  node_account_created["Account created"]
  node_account_deleted["Account deleted"]
  node_products["Product catalog<br/>[Products.page.js]"]
  node_cart["Shopping cart<br/>[Cart.page.js]"]
  node_checkout["Checkout<br/>[Checkout.page.js]"]
  node_payment["Payment<br/>[Payment.page.js]"]
  node_payment_completed["Order confirmation"]
  node_contact["Contact form<br/>[Contact.page.js]"]
end

subgraph group_data["Test data"]
  node_dynamic_data["Dynamic data"]
  node_credentials["Credentials<br/>[credentials.json]"]
  node_purchase_data["Purchase data<br/>[purchaseFlow.json]"]
end

node_website["Automation Exercise"]

node_runner -->|"runs"| node_feature_tests
node_runner -->|"runs"| node_scenario_tests
node_runner -->|"runs"| node_e2e_tests
node_runner -->|"runs setup"| node_auth_setup
node_feature_tests -->|"consume"| node_fixtures
node_scenario_tests -.->|"consume"| node_fixtures
node_e2e_tests -.->|"consume"| node_fixtures
node_auth_setup -->|"stores"| node_browser_state
node_fixtures -->|"instantiates"| node_home
node_fixtures -->|"instantiates"| node_navigation
node_fixtures -->|"instantiates"| node_login
node_fixtures -->|"instantiates"| node_signup
node_fixtures -->|"instantiates"| node_account_created
node_fixtures -->|"instantiates"| node_account_deleted
node_fixtures -->|"instantiates"| node_products
node_fixtures -->|"instantiates"| node_cart
node_fixtures -->|"instantiates"| node_checkout
node_fixtures -->|"instantiates"| node_payment
node_fixtures -->|"instantiates"| node_payment_completed
node_fixtures -->|"instantiates"| node_contact
node_dynamic_data -->|"reads"| node_purchase_data
node_feature_tests -.->|"uses"| node_credentials
node_signup -.->|"uses"| node_dynamic_data
node_navigation -->|"opens"| node_contact
node_products -->|"automates"| node_website
node_cart -->|"automates"| node_website
node_checkout -->|"automates"| node_website
node_payment -->|"automates"| node_website
node_contact -->|"automates"| node_website
node_login -->|"extends"| node_base_page
node_signup -->|"extends"| node_base_page
node_navigation -->|"extends"| node_base_page
node_home -->|"extends"| node_base_page
node_products -->|"extends"| node_base_page
node_cart -->|"extends"| node_base_page
node_checkout -->|"extends"| node_base_page
node_payment -->|"extends"| node_base_page
node_payment_completed -->|"extends"| node_base_page
node_contact -->|"extends"| node_base_page
node_account_created -->|"extends"| node_base_page
node_account_deleted -->|"extends"| node_base_page

click node_feature_tests "https://github.com/hasanazeerkhan/automationexercise/tree/master/tests/modules"
click node_scenario_tests "https://github.com/hasanazeerkhan/automationexercise/tree/master/tests/scenario"
click node_e2e_tests "https://github.com/hasanazeerkhan/automationexercise/tree/master/tests/e2e"
click node_auth_setup "https://github.com/hasanazeerkhan/automationexercise/blob/master/tests/auth.setup.js"
click node_fixtures "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/fixtures/Page.fixtures.js"
click node_base_page "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Base.page.js"
click node_navigation "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Navigation.Tab.js"
click node_home "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Home.page.js"
click node_login "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Login.page.js"
click node_signup "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Signup.page.js"
click node_account_created "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/AccountCreated.page.js"
click node_account_deleted "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/AccountDeleted.page.js"
click node_products "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Products.page.js"
click node_cart "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Cart.page.js"
click node_checkout "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Checkout.page.js"
click node_payment "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Payment.page.js"
click node_payment_completed "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/PaymentCompleted.page.js"
click node_contact "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Contact.page.js"
click node_dynamic_data "https://github.com/hasanazeerkhan/automationexercise/blob/master/src/utils/dynamicDataGenerator.utils.js"
click node_credentials "https://github.com/hasanazeerkhan/automationexercise/blob/master/testData/credentials.json"
click node_purchase_data "https://github.com/hasanazeerkhan/automationexercise/blob/master/testData/purchaseFlow.json"

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_runner,node_feature_tests,node_scenario_tests,node_e2e_tests,node_auth_setup,node_fixtures,node_browser_state toneBlue
class node_base_page,node_navigation,node_home,node_login,node_signup,node_account_created,node_account_deleted,node_products,node_cart,node_checkout,node_payment,node_payment_completed,node_contact toneAmber
class node_dynamic_data,node_credentials,node_purchase_data toneMint
class node_website toneIndigo
```

## Components

### Test execution

- **Playwright runner**
- [Feature tests](https://github.com/hasanazeerkhan/automationexercise/tree/master/tests/modules): `tests/modules`
- [Scenario tests](https://github.com/hasanazeerkhan/automationexercise/tree/master/tests/scenario): `tests/scenario`
- [End-to-end tests](https://github.com/hasanazeerkhan/automationexercise/tree/master/tests/e2e): `tests/e2e`
- [Authentication setup](https://github.com/hasanazeerkhan/automationexercise/blob/master/tests/auth.setup.js): `tests/auth.setup.js`
- [Page fixtures](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/fixtures/Page.fixtures.js): `src/fixtures/Page.fixtures.js`
- **Stored browser state**

### Page objects

- [Base page](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Base.page.js): `src/pages/Base.page.js`
- [Navigation](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Navigation.Tab.js): `src/pages/Navigation.Tab.js`
- [Home page](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Home.page.js): `src/pages/Home.page.js`
- [Login](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Login.page.js): `src/pages/Login.page.js`
- [Signup](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Signup.page.js): `src/pages/Signup.page.js`
- [Account created](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/AccountCreated.page.js): `src/pages/AccountCreated.page.js`
- [Account deleted](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/AccountDeleted.page.js): `src/pages/AccountDeleted.page.js`
- [Product catalog](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Products.page.js): `src/pages/Products.page.js`
- [Shopping cart](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Cart.page.js): `src/pages/Cart.page.js`
- [Checkout](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Checkout.page.js): `src/pages/Checkout.page.js`
- [Payment](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Payment.page.js): `src/pages/Payment.page.js`
- [Order confirmation](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/PaymentCompleted.page.js): `src/pages/PaymentCompleted.page.js`
- [Contact form](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/pages/Contact.page.js): `src/pages/Contact.page.js`

### Test data

- [Dynamic data](https://github.com/hasanazeerkhan/automationexercise/blob/master/src/utils/dynamicDataGenerator.utils.js): `src/utils/dynamicDataGenerator.utils.js`
- [Credentials](https://github.com/hasanazeerkhan/automationexercise/blob/master/testData/credentials.json): `testData/credentials.json`
- [Purchase data](https://github.com/hasanazeerkhan/automationexercise/blob/master/testData/purchaseFlow.json): `testData/purchaseFlow.json`

### Other components

- **Automation Exercise**

## Connections

- Playwright runner → Feature tests: runs (evidence: `README.md`)
- Playwright runner → Scenario tests: runs (evidence: `README.md`)
- Playwright runner → End-to-end tests: runs (evidence: `README.md`)
- Playwright runner → Authentication setup: runs setup (evidence: `README.md`)
- Feature tests → Page fixtures: consume (evidence: `README.md`)
- Scenario tests → Page fixtures: consume (evidence: `README.md`)
- End-to-end tests → Page fixtures: consume (evidence: `README.md`)
- Authentication setup → Stored browser state: stores (evidence: `README.md`)
- Page fixtures → Home page: instantiates (evidence: `README.md`)
- Page fixtures → Navigation: instantiates (evidence: `README.md`)
- Page fixtures → Login: instantiates (evidence: `README.md`)
- Page fixtures → Signup: instantiates (evidence: `README.md`)
- Page fixtures → Account created: instantiates (evidence: `README.md`)
- Page fixtures → Account deleted: instantiates (evidence: `README.md`)
- Page fixtures → Product catalog: instantiates (evidence: `README.md`)
- Page fixtures → Shopping cart: instantiates (evidence: `README.md`)
- Page fixtures → Checkout: instantiates (evidence: `README.md`)
- Page fixtures → Payment: instantiates (evidence: `README.md`)
- Page fixtures → Order confirmation: instantiates (evidence: `README.md`)
- Page fixtures → Contact form: instantiates (evidence: `README.md`)
- Dynamic data → Purchase data: reads (evidence: `src/utils/dynamicDataGenerator.utils.js`)
- Feature tests → Credentials: uses (evidence: `README.md`)
- Signup → Dynamic data: uses (evidence: `README.md`)
- Navigation → Contact form: opens (evidence: `src/pages/Navigation.Tab.js`)
- Product catalog → Automation Exercise: automates (evidence: `README.md`)
- Shopping cart → Automation Exercise: automates (evidence: `README.md`)
- Checkout → Automation Exercise: automates (evidence: `README.md`)
- Payment → Automation Exercise: automates (evidence: `README.md`)
- Contact form → Automation Exercise: automates (evidence: `README.md`)
- Login → Base page: extends (evidence: `src/pages/Login.page.js`)
- Signup → Base page: extends (evidence: `src/pages/Signup.page.js`)
- Navigation → Base page: extends (evidence: `src/pages/Navigation.Tab.js`)
- Home page → Base page: extends (evidence: `src/pages/Home.page.js`)
- Product catalog → Base page: extends (evidence: `src/pages/Products.page.js`)
- Shopping cart → Base page: extends (evidence: `src/pages/Cart.page.js`)
- Checkout → Base page: extends (evidence: `src/pages/Checkout.page.js`)
- Payment → Base page: extends (evidence: `src/pages/Payment.page.js`)
- Order confirmation → Base page: extends (evidence: `src/pages/PaymentCompleted.page.js`)
- Contact form → Base page: extends (evidence: `src/pages/Contact.page.js`)
- Account created → Base page: extends (evidence: `src/pages/AccountCreated.page.js`)
- Account deleted → Base page: extends (evidence: `src/pages/AccountDeleted.page.js`)
