# jaykishoreduvvuri/playwright-javascript-saucedemo architecture

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

- Interactive diagram: https://gitdiagram.com/jaykishoreduvvuri/playwright-javascript-saucedemo
- Repository: https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo

## Overview

This repository is a Playwright-based UI automation suite for SauceDemo, organized around page objects and reusable browser actions. Its principal workflow covers login, product browsing and cart operations, checkout information, order review, and completion; the scenarios also exercise locked-out, problem, and performance-glitch users. The README documents the scenarios and application under test; sampled source shows the shared fixture, page wrappers, selectors, and base browser helpers. Individual test-file wiring was not sampled, so links from scenarios to the fixture are marked unverified.

Main entry points: [`testFixtures/fixture.js`](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/testFixtures/fixture.js) (Page fixtures), [`pages/basePage.js`](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/basePage.js) (Browser helpers), [`pages/loginPage.js`](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/loginPage.js) (Login page), [`pages/productsPage.js`](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/productsPage.js) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenarios["Test scenarios"]
  node_product_test["Products smoke test"]
  node_checkout_test["Checkout happy path"]
  node_standard_glitch_test["Standard to glitch"]
  node_problem_glitch_test["Problem to glitch"]
  node_glitch_standard_test["Glitch to standard"]
end

subgraph group_runtime["Test runtime"]
  node_fixture["Page fixtures<br/>[fixture.js]"]
  node_base["Browser helpers<br/>[basePage.js]"]
  node_config["App URL config<br/>[config.js]"]
end

subgraph group_shopping["Shopping flow"]
  node_login["Login page<br/>[loginPage.js]"]
  node_products["Product catalog<br/>[productsPage.js]"]
  node_details["Product details"]
  node_cart["Shopping cart<br/>[yourCartPage.js]"]
  node_login_selectors["Login selectors<br/>[loginPage.js]"]
  node_product_selectors["Catalog selectors<br/>[productsPage.js]"]
  node_detail_selectors["Detail selectors"]
  node_cart_selectors["Cart selectors<br/>[yourCartPage.js]"]
end

subgraph group_checkout["Checkout flow"]
  node_information["Checkout information"]
  node_overview["Order overview"]
  node_complete["Checkout complete"]
  node_information_selectors["Information selectors"]
  node_overview_selectors["Overview selectors"]
  node_complete_selectors["Completion selectors"]
end

node_operator(("Test operator"))
node_playwright_page["Playwright page"]
node_sauce["SauceDemo app"]

node_operator -->|"runs"| node_product_test
node_operator -->|"runs"| node_checkout_test
node_operator -->|"runs"| node_standard_glitch_test
node_operator -->|"runs"| node_problem_glitch_test
node_operator -->|"runs"| node_glitch_standard_test
node_product_test -.->|"uses"| node_fixture
node_checkout_test -.->|"uses"| node_fixture
node_standard_glitch_test -.->|"uses"| node_fixture
node_problem_glitch_test -.->|"uses"| node_fixture
node_glitch_standard_test -.->|"uses"| node_fixture
node_fixture -->|"creates"| node_login
node_fixture -->|"creates"| node_products
node_fixture -->|"creates"| node_details
node_fixture -->|"creates"| node_cart
node_fixture -->|"creates"| node_information
node_fixture -->|"creates"| node_overview
node_fixture -->|"creates"| node_complete
node_login -->|"inherits"| node_base
node_products -->|"inherits"| node_base
node_details -->|"inherits"| node_base
node_cart -->|"inherits"| node_base
node_information -->|"inherits"| node_base
node_overview -->|"inherits"| node_base
node_complete -->|"inherits"| node_base
node_base -->|"drives"| node_playwright_page
node_login -->|"uses"| node_login_selectors
node_products -->|"uses"| node_product_selectors
node_details -->|"uses"| node_detail_selectors
node_cart -->|"uses"| node_cart_selectors
node_information -->|"uses"| node_information_selectors
node_overview -->|"uses"| node_overview_selectors
node_complete -->|"uses"| node_complete_selectors
node_login -->|"reads URL"| node_config
node_playwright_page -->|"automates"| node_sauce

click node_product_test "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_01_productPage.test.js"
click node_checkout_test "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_02_checkoutWorkflow.test.js"
click node_standard_glitch_test "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_03_checkoutWithSUandPGU.test.js"
click node_problem_glitch_test "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_04_checkoutWithPUandPGU.test.js"
click node_glitch_standard_test "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_05_checkoutWithPGUandSU.test.js"
click node_fixture "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/testFixtures/fixture.js"
click node_base "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/basePage.js"
click node_login "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/loginPage.js"
click node_products "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/productsPage.js"
click node_details "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/productDetailsPage.js"
click node_cart "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/yourCartPage.js"
click node_login_selectors "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/loginPage.js"
click node_product_selectors "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/productsPage.js"
click node_detail_selectors "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/productDetailsPage.js"
click node_cart_selectors "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/yourCartPage.js"
click node_information "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/checkoutYourInformationPage.js"
click node_overview "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/checkoutOverviewPage.js"
click node_complete "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/checkoutCompletePage.js"
click node_information_selectors "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/checkoutYourInformationPage.js"
click node_overview_selectors "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/checkoutOverviewPage.js"
click node_complete_selectors "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/checkoutCompletePage.js"
click node_config "https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/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_product_test,node_checkout_test,node_standard_glitch_test,node_problem_glitch_test,node_glitch_standard_test toneBlue
class node_fixture,node_base,node_config toneAmber
class node_login,node_products,node_details,node_cart,node_login_selectors,node_product_selectors,node_detail_selectors,node_cart_selectors toneMint
class node_information,node_overview,node_complete,node_information_selectors,node_overview_selectors,node_complete_selectors toneRose
class node_operator,node_playwright_page,node_sauce toneIndigo
```

## Components

### Test scenarios

- [Products smoke test](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_01_productPage.test.js): `tests/TC_01_productPage.test.js`
- [Checkout happy path](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_02_checkoutWorkflow.test.js): `tests/TC_02_checkoutWorkflow.test.js`
- [Standard to glitch](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_03_checkoutWithSUandPGU.test.js): `tests/TC_03_checkoutWithSUandPGU.test.js`
- [Problem to glitch](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_04_checkoutWithPUandPGU.test.js): `tests/TC_04_checkoutWithPUandPGU.test.js`
- [Glitch to standard](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/tests/TC_05_checkoutWithPGUandSU.test.js): `tests/TC_05_checkoutWithPGUandSU.test.js`

### Test runtime

- [Page fixtures](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/testFixtures/fixture.js): `testFixtures/fixture.js`
- [Browser helpers](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/basePage.js): `pages/basePage.js`
- [App URL config](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/config.js): `config.js`

### Shopping flow

- [Login page](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/loginPage.js): `pages/loginPage.js`
- [Product catalog](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/productsPage.js): `pages/productsPage.js`
- [Product details](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/productDetailsPage.js): `pages/productDetailsPage.js`
- [Shopping cart](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/yourCartPage.js): `pages/yourCartPage.js`
- [Login selectors](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/loginPage.js): `pageobjects/loginPage.js`
- [Catalog selectors](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/productsPage.js): `pageobjects/productsPage.js`
- [Detail selectors](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/productDetailsPage.js): `pageobjects/productDetailsPage.js`
- [Cart selectors](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/yourCartPage.js): `pageobjects/yourCartPage.js`

### Checkout flow

- [Checkout information](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/checkoutYourInformationPage.js): `pages/checkoutYourInformationPage.js`
- [Order overview](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/checkoutOverviewPage.js): `pages/checkoutOverviewPage.js`
- [Checkout complete](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pages/checkoutCompletePage.js): `pages/checkoutCompletePage.js`
- [Information selectors](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/checkoutYourInformationPage.js): `pageobjects/checkoutYourInformationPage.js`
- [Overview selectors](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/checkoutOverviewPage.js): `pageobjects/checkoutOverviewPage.js`
- [Completion selectors](https://github.com/jaykishoreduvvuri/playwright-javascript-saucedemo/blob/main/pageobjects/checkoutCompletePage.js): `pageobjects/checkoutCompletePage.js`

### Other components

- **Test operator**
- **Playwright page**
- **SauceDemo app**

## Connections

- Test operator → Products smoke test: runs (evidence: `README.md`)
- Test operator → Checkout happy path: runs (evidence: `README.md`)
- Test operator → Standard to glitch: runs (evidence: `README.md`)
- Test operator → Problem to glitch: runs (evidence: `README.md`)
- Test operator → Glitch to standard: runs (evidence: `README.md`)
- Products smoke test → Page fixtures: uses
- Checkout happy path → Page fixtures: uses
- Standard to glitch → Page fixtures: uses
- Problem to glitch → Page fixtures: uses
- Glitch to standard → Page fixtures: uses
- Page fixtures → Login page: creates (evidence: `testFixtures/fixture.js`)
- Page fixtures → Product catalog: creates (evidence: `testFixtures/fixture.js`)
- Page fixtures → Product details: creates (evidence: `testFixtures/fixture.js`)
- Page fixtures → Shopping cart: creates (evidence: `testFixtures/fixture.js`)
- Page fixtures → Checkout information: creates (evidence: `testFixtures/fixture.js`)
- Page fixtures → Order overview: creates (evidence: `testFixtures/fixture.js`)
- Page fixtures → Checkout complete: creates (evidence: `testFixtures/fixture.js`)
- Login page → Browser helpers: inherits (evidence: `pages/loginPage.js`)
- Product catalog → Browser helpers: inherits (evidence: `pages/productsPage.js`)
- Product details → Browser helpers: inherits (evidence: `pages/productDetailsPage.js`)
- Shopping cart → Browser helpers: inherits (evidence: `pages/yourCartPage.js`)
- Checkout information → Browser helpers: inherits (evidence: `pages/checkoutYourInformationPage.js`)
- Order overview → Browser helpers: inherits (evidence: `pages/checkoutOverviewPage.js`)
- Checkout complete → Browser helpers: inherits (evidence: `pages/checkoutCompletePage.js`)
- Browser helpers → Playwright page: drives (evidence: `pages/basePage.js`)
- Login page → Login selectors: uses (evidence: `pages/loginPage.js`)
- Product catalog → Catalog selectors: uses (evidence: `pages/productsPage.js`)
- Product details → Detail selectors: uses (evidence: `pages/productDetailsPage.js`)
- Shopping cart → Cart selectors: uses (evidence: `pages/yourCartPage.js`)
- Checkout information → Information selectors: uses (evidence: `pages/checkoutYourInformationPage.js`)
- Order overview → Overview selectors: uses (evidence: `pages/checkoutOverviewPage.js`)
- Checkout complete → Completion selectors: uses (evidence: `pages/checkoutCompletePage.js`)
- Login page → App URL config: reads URL (evidence: `pages/loginPage.js`)
- Playwright page → SauceDemo app: automates (evidence: `README.md`)
