# laraalexlopes/saucedemo-e2e-tests architecture

> Architecture diagram of the GitHub repository laraalexlopes/saucedemo-e2e-tests, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/laraalexlopes/saucedemo-e2e-tests
- Repository: https://github.com/laraalexlopes/saucedemo-e2e-tests

## Overview

This repository is an end-to-end Playwright test suite for SauceDemo, not the e-commerce application itself. Its documented workflow is to prepare session/cart state, exercise page-object actions, and assert functional, accessibility, visual, and checkout results across browsers. The README documents fixture and spec organization, but those implementations were not sampled; links to them are therefore shown only where the README explicitly describes the relationship.

Main entry points: [`src/fixtures`](https://github.com/laraalexlopes/saucedemo-e2e-tests/tree/main/src/fixtures) (Workflow fixtures), [`src/pages/pages.ts`](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/pages/pages.ts) (Page objects), [`src/data/products.ts`](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/products.ts) (Catalog and totals), [`src/data/customer.factory.ts`](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/customer.factory.ts) (Customer factory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Test Preparation"]
  node_fixtures["Workflow fixtures"]
end

subgraph group_domain["Test Domain Data"]
  node_catalog["Catalog and totals<br/>[products.ts]"]
  node_users["Test users<br/>[users.ts]"]
  node_customers["Customer factory"]
end

subgraph group_interaction["Browser Interaction"]
  node_pages["Page objects<br/>[pages.ts]"]
end

subgraph group_verification["Test Verification"]
  node_scenarios["Test scenarios"]
  node_login["Login scenarios<br/>[auth.spec.ts]"]
  node_inventory["Inventory scenarios<br/>[inventory.spec.ts]"]
  node_cart["Cart scenarios<br/>[cart.spec.ts]"]
  node_checkout["Checkout scenarios<br/>[checkout.spec.ts]"]
  node_accessibility["Accessibility checks"]
  node_visual["Visual regression<br/>[visual.spec.ts]"]
  node_known["Known-issue checks"]
end

node_engineer(("Test runner"))
node_saucedemo(("SauceDemo"))

node_engineer -->|"runs"| node_scenarios
node_scenarios -->|"uses steps"| node_fixtures
node_fixtures -.->|"uses page objects"| node_pages
node_pages -->|"drives browser"| node_saucedemo
node_login -->|"uses steps"| node_fixtures
node_inventory -->|"uses steps"| node_fixtures
node_cart -->|"uses steps"| node_fixtures
node_checkout -->|"uses steps"| node_fixtures
node_accessibility -.->|"uses steps"| node_fixtures
node_visual -.->|"uses steps"| node_fixtures
node_known -.->|"uses steps"| node_fixtures
node_fixtures -->|"checks totals"| node_catalog
node_fixtures -->|"builds customer"| node_customers
node_fixtures -.->|"selects session"| node_users
node_catalog -->|"types products"| node_pages
node_customers -->|"types customer"| node_pages

click node_scenarios "https://github.com/laraalexlopes/saucedemo-e2e-tests/tree/main/tests"
click node_fixtures "https://github.com/laraalexlopes/saucedemo-e2e-tests/tree/main/src/fixtures"
click node_pages "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/pages/pages.ts"
click node_login "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/auth.spec.ts"
click node_inventory "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/inventory.spec.ts"
click node_cart "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/cart.spec.ts"
click node_checkout "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/checkout.spec.ts"
click node_accessibility "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/accessibility.spec.ts"
click node_visual "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/visual.spec.ts"
click node_known "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/known-issues.spec.ts"
click node_catalog "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/products.ts"
click node_users "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/users.ts"
click node_customers "https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/customer.factory.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_fixtures toneBlue
class node_catalog,node_users,node_customers toneAmber
class node_pages toneMint
class node_scenarios,node_login,node_inventory,node_cart,node_checkout,node_accessibility,node_visual,node_known toneRose
class node_engineer,node_saucedemo toneIndigo
```

## Components

### Test Preparation

- [Workflow fixtures](https://github.com/laraalexlopes/saucedemo-e2e-tests/tree/main/src/fixtures): `src/fixtures`

### Test Domain Data

- [Catalog and totals](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/products.ts): `src/data/products.ts`
- [Test users](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/users.ts): `src/data/users.ts`
- [Customer factory](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/data/customer.factory.ts): `src/data/customer.factory.ts`

### Browser Interaction

- [Page objects](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/src/pages/pages.ts): `src/pages/pages.ts`

### Test Verification

- [Test scenarios](https://github.com/laraalexlopes/saucedemo-e2e-tests/tree/main/tests): `tests`
- [Login scenarios](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/auth.spec.ts): `tests/auth.spec.ts`
- [Inventory scenarios](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/inventory.spec.ts): `tests/inventory.spec.ts`
- [Cart scenarios](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/cart.spec.ts): `tests/cart.spec.ts`
- [Checkout scenarios](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/checkout.spec.ts): `tests/checkout.spec.ts`
- [Accessibility checks](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/accessibility.spec.ts): `tests/accessibility.spec.ts`
- [Visual regression](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/visual.spec.ts): `tests/visual.spec.ts`
- [Known-issue checks](https://github.com/laraalexlopes/saucedemo-e2e-tests/blob/main/tests/known-issues.spec.ts): `tests/known-issues.spec.ts`

### Other components

- **Test runner**
- **SauceDemo**

## Connections

- Test runner → Test scenarios: runs (evidence: `README.md`)
- Test scenarios → Workflow fixtures: uses steps (evidence: `README.md`)
- Workflow fixtures → Page objects: uses page objects
- Page objects → SauceDemo: drives browser (evidence: `src/pages/pages.ts`)
- Login scenarios → Workflow fixtures: uses steps (evidence: `README.md`)
- Inventory scenarios → Workflow fixtures: uses steps (evidence: `README.md`)
- Cart scenarios → Workflow fixtures: uses steps (evidence: `README.md`)
- Checkout scenarios → Workflow fixtures: uses steps (evidence: `README.md`)
- Accessibility checks → Workflow fixtures: uses steps
- Visual regression → Workflow fixtures: uses steps
- Known-issue checks → Workflow fixtures: uses steps
- Workflow fixtures → Catalog and totals: checks totals (evidence: `README.md`)
- Workflow fixtures → Customer factory: builds customer (evidence: `README.md`)
- Workflow fixtures → Test users: selects session
- Catalog and totals → Page objects: types products (evidence: `src/pages/pages.ts`)
- Customer factory → Page objects: types customer (evidence: `src/pages/pages.ts`)
