# kischa-hub/appsfactorytask architecture

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

- Interactive diagram: https://gitdiagram.com/kischa-hub/appsfactorytask
- Repository: https://github.com/kischa-hub/appsfactorytask

## Overview

This repository is a Cucumber/Playwright browser-test application for Amazon.de guest shopping. Its user-to-result flow is a scenario driving product search and selection, basket assertions, then verification of the guest sign-in checkpoint. The feature and step-definition files are present in the tree but were not sampled, so their internal calls are not asserted; README statements support the major workflow. The graph shows the sampled page-object and utility relationships, while omitting unsupported step wiring.

Main entry points: [`src/pages/AmazonPage.ts`](https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/AmazonPage.ts) (Amazon search), [`src/pages/BasketPage.ts`](https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/BasketPage.ts) (Basket checks), [`src/utils/cookies.ts`](https://github.com/kischa-hub/appsfactorytask/blob/main/src/utils/cookies.ts) (Cookie dismissal), [`src/pages/AccountPage.ts`](https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/AccountPage.ts) (Guest checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Shopping journey"]
  node_scenario["Cucumber scenario"]
  node_steps["Journey steps<br/>[amazonSteps.ts]"]
end

subgraph group_pages["Page objects"]
  node_amazon["Amazon search<br/>[AmazonPage.ts]"]
  node_basket["Basket checks<br/>[BasketPage.ts]"]
  node_account["Guest checkout<br/>[AccountPage.ts]"]
end

subgraph group_helpers["Shared helpers"]
  node_cookies["Cookie dismissal<br/>[cookies.ts]"]
  node_price["Price parsing<br/>[price.ts]"]
end

node_amazonde(("Amazon.de"))

node_scenario -.->|"defines steps"| node_steps
node_amazon -->|"dismisses banner"| node_cookies
node_amazon -->|"parses price"| node_price
node_basket -->|"dismisses banner"| node_cookies
node_basket -->|"parses subtotal"| node_price
node_account -->|"dismisses banner"| node_cookies
node_amazon -->|"searches and adds"| node_amazonde
node_basket -->|"reads and checks"| node_amazonde
node_account -->|"checks sign-in"| node_amazonde

click node_scenario "https://github.com/kischa-hub/appsfactorytask/blob/main/src/tests/features/amazonFeature.feature"
click node_steps "https://github.com/kischa-hub/appsfactorytask/blob/main/src/tests/stepsDefinitions/amazonSteps.ts"
click node_amazon "https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/AmazonPage.ts"
click node_basket "https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/BasketPage.ts"
click node_account "https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/AccountPage.ts"
click node_cookies "https://github.com/kischa-hub/appsfactorytask/blob/main/src/utils/cookies.ts"
click node_price "https://github.com/kischa-hub/appsfactorytask/blob/main/src/utils/price.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_scenario,node_steps toneBlue
class node_amazon,node_basket,node_account toneAmber
class node_cookies,node_price toneMint
class node_amazonde toneIndigo
```

## Components

### Shopping journey

- [Cucumber scenario](https://github.com/kischa-hub/appsfactorytask/blob/main/src/tests/features/amazonFeature.feature): `src/tests/features/amazonFeature.feature`
- [Journey steps](https://github.com/kischa-hub/appsfactorytask/blob/main/src/tests/stepsDefinitions/amazonSteps.ts): `src/tests/stepsDefinitions/amazonSteps.ts`

### Page objects

- [Amazon search](https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/AmazonPage.ts): `src/pages/AmazonPage.ts`
- [Basket checks](https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/BasketPage.ts): `src/pages/BasketPage.ts`
- [Guest checkout](https://github.com/kischa-hub/appsfactorytask/blob/main/src/pages/AccountPage.ts): `src/pages/AccountPage.ts`

### Shared helpers

- [Cookie dismissal](https://github.com/kischa-hub/appsfactorytask/blob/main/src/utils/cookies.ts): `src/utils/cookies.ts`
- [Price parsing](https://github.com/kischa-hub/appsfactorytask/blob/main/src/utils/price.ts): `src/utils/price.ts`

### Other components

- **Amazon.de**

## Connections

- Cucumber scenario → Journey steps: defines steps (evidence: `Readme.md`)
- Amazon search → Cookie dismissal: dismisses banner (evidence: `src/pages/AmazonPage.ts`)
- Amazon search → Price parsing: parses price (evidence: `src/pages/AmazonPage.ts`)
- Basket checks → Cookie dismissal: dismisses banner (evidence: `src/pages/BasketPage.ts`)
- Basket checks → Price parsing: parses subtotal (evidence: `src/pages/BasketPage.ts`)
- Guest checkout → Cookie dismissal: dismisses banner (evidence: `src/pages/AccountPage.ts`)
- Amazon search → Amazon.de: searches and adds (evidence: `src/pages/AmazonPage.ts`)
- Basket checks → Amazon.de: reads and checks (evidence: `src/pages/BasketPage.ts`)
- Guest checkout → Amazon.de: checks sign-in (evidence: `src/pages/AccountPage.ts`)
