# lazkorsan/qa101-instulearn-ui architecture

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

- Interactive diagram: https://gitdiagram.com/lazkorsan/qa101-instulearn-ui
- Repository: https://github.com/lazkorsan/qa101-instulearn-ui

## Overview

This repository is a Playwright UI test-automation framework for InstuLearn, with two execution styles: native Playwright specs and Cucumber/Gherkin scenarios. The principal BDD path is feature scenario → step definition → page object or verification helper → tested site; Cucumber hooks provision and clean up the browser context. Native specs provide a separate direct-test path. The graph preserves the documented Dashboard, Example, Store, Student, and Quiz test areas. Some feature-to-step wiring and unsampled domain implementations are documented or represented only by their tree paths; edges are omitted where the excerpts do not establish a call.

Main entry points: [`src/step-definitions`](https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/step-definitions) (Cucumber step definitions), [`src/pages/StudentPage.ts`](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/StudentPage.ts) (Student page workflows), [`src/features`](https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/features) (Gherkin features), [`src/pages/BasePage.ts`](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/BasePage.ts) (Base page actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_cucumber["Cucumber step definitions"]
  node_hooks["Browser lifecycle hooks<br/>[hooks.ts]"]
  node_runner["Cucumber runner<br/>[Runner.ts]"]
end

subgraph group_scenarios["Test scenarios"]
  node_native["Native Playwright tests"]
  node_features["Gherkin features"]
  node_quiztests["Quiz scenarios"]
end

subgraph group_pages["Page objects"]
  node_basepage["Base page actions<br/>[BasePage.ts]"]
  node_studentpage["Student page workflows<br/>[StudentPage.ts]"]
  node_dashboardpage["Dashboard page workflows<br/>[DashboardPage.ts]"]
  node_examplepage["Example page workflows<br/>[ExamplePage.ts]"]
  node_storepage["Store page workflows<br/>[StorePage.ts]"]
end

subgraph group_helpers["Test helpers"]
  node_reusable["Verification helpers<br/>[ReusableMethods.ts]"]
  node_browserutils["Browser interaction utilities<br/>[ClickUtils.ts]"]
end

subgraph group_observability["Logging and state"]
  node_logger["Execution logger<br/>[LoggerHelper.ts]"]
  node_pluginlogger["Cucumber scenario logger"]
  node_accounts[("Account storage")]
end

node_engineer(("Test author"))
node_site["InstuLearn QA site"]

node_engineer -->|"writes tests"| node_native
node_engineer -->|"writes scenarios"| node_features
node_native -->|"tests UI"| node_site
node_runner -.->|"runs scenarios"| node_features
node_features -->|"dispatches steps"| node_cucumber
node_cucumber -->|"calls page methods"| node_studentpage
node_cucumber -->|"calls page methods"| node_dashboardpage
node_cucumber -->|"calls page methods"| node_examplepage
node_cucumber -->|"calls verifications"| node_reusable
node_cucumber -->|"saves account data"| node_accounts
node_cucumber -->|"writes execution logs"| node_logger
node_hooks -->|"logs scenario lifecycle"| node_pluginlogger
node_hooks -->|"opens browser context"| node_site
node_studentpage -->|"extends actions"| node_basepage
node_dashboardpage -->|"extends actions"| node_basepage
node_examplepage -->|"extends actions"| node_basepage
node_studentpage -->|"logs workflow"| node_logger
node_accounts -->|"logs storage result"| node_logger
node_reusable -.->|"verifies page state"| node_site
node_quiztests -->|"tests UI"| node_site

click node_native "https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/NativeTest"
click node_features "https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/features"
click node_cucumber "https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/step-definitions"
click node_hooks "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/step-definitions/hooks.ts"
click node_runner "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/Runners/Runner.ts"
click node_basepage "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/BasePage.ts"
click node_studentpage "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/StudentPage.ts"
click node_dashboardpage "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/DashboardPage.ts"
click node_examplepage "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/ExamplePage.ts"
click node_storepage "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/StorePage.ts"
click node_quiztests "https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/NativeTest/Quiz"
click node_reusable "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/ReusableMethods.ts"
click node_browserutils "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/ClickUtils.ts"
click node_logger "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/LoggerHelper.ts"
click node_pluginlogger "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/step-definitions/LoginPluginLogger.ts"
click node_accounts "https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/AccountStorageHelper.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_cucumber,node_hooks,node_runner toneBlue
class node_native,node_features,node_quiztests toneAmber
class node_basepage,node_studentpage,node_dashboardpage,node_examplepage,node_storepage toneMint
class node_reusable,node_browserutils toneRose
class node_logger,node_pluginlogger,node_accounts,node_engineer,node_site toneIndigo
```

## Components

### Test execution

- [Cucumber step definitions](https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/step-definitions): `src/step-definitions`
- [Browser lifecycle hooks](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/step-definitions/hooks.ts): `src/step-definitions/hooks.ts`
- [Cucumber runner](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/Runners/Runner.ts): `src/Runners/Runner.ts`

### Test scenarios

- [Native Playwright tests](https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/NativeTest): `src/NativeTest`
- [Gherkin features](https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/features): `src/features`
- [Quiz scenarios](https://github.com/lazkorsan/qa101-instulearn-ui/tree/main/src/NativeTest/Quiz): `src/NativeTest/Quiz`

### Page objects

- [Base page actions](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/BasePage.ts): `src/pages/BasePage.ts`
- [Student page workflows](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/StudentPage.ts): `src/pages/StudentPage.ts`
- [Dashboard page workflows](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/DashboardPage.ts): `src/pages/DashboardPage.ts`
- [Example page workflows](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/ExamplePage.ts): `src/pages/ExamplePage.ts`
- [Store page workflows](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/pages/StorePage.ts): `src/pages/StorePage.ts`

### Test helpers

- [Verification helpers](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/ReusableMethods.ts): `src/utils/ReusableMethods.ts`
- [Browser interaction utilities](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/ClickUtils.ts): `src/utils/ClickUtils.ts`

### Logging and state

- [Execution logger](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/LoggerHelper.ts): `src/utils/LoggerHelper.ts`
- [Cucumber scenario logger](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/step-definitions/LoginPluginLogger.ts): `src/step-definitions/LoginPluginLogger.ts`
- [Account storage](https://github.com/lazkorsan/qa101-instulearn-ui/blob/main/src/utils/AccountStorageHelper.ts): `src/utils/AccountStorageHelper.ts`

### Other components

- **Test author**
- **InstuLearn QA site**

## Connections

- Test author → Native Playwright tests: writes tests (evidence: `Readme.md`)
- Test author → Gherkin features: writes scenarios (evidence: `Readme.md`)
- Native Playwright tests → InstuLearn QA site: tests UI (evidence: `Readme.md`)
- Cucumber runner → Gherkin features: runs scenarios
- Gherkin features → Cucumber step definitions: dispatches steps (evidence: `Readme.md`)
- Cucumber step definitions → Student page workflows: calls page methods (evidence: `src/step-definitions/StudentSteps.ts`)
- Cucumber step definitions → Dashboard page workflows: calls page methods (evidence: `src/step-definitions/DashboardSteps.ts`)
- Cucumber step definitions → Example page workflows: calls page methods (evidence: `src/step-definitions/ExampleSteps.ts`)
- Cucumber step definitions → Verification helpers: calls verifications (evidence: `src/step-definitions/ExampleSteps.ts`)
- Cucumber step definitions → Account storage: saves account data (evidence: `src/step-definitions/StudentSteps.ts`)
- Cucumber step definitions → Execution logger: writes execution logs (evidence: `src/step-definitions/ExampleSteps.ts`)
- Browser lifecycle hooks → Cucumber scenario logger: logs scenario lifecycle (evidence: `src/step-definitions/hooks.ts`)
- Browser lifecycle hooks → InstuLearn QA site: opens browser context (evidence: `src/step-definitions/hooks.ts`)
- Student page workflows → Base page actions: extends actions (evidence: `src/pages/StudentPage.ts`)
- Dashboard page workflows → Base page actions: extends actions (evidence: `src/pages/DashboardPage.ts`)
- Example page workflows → Base page actions: extends actions (evidence: `src/pages/ExamplePage.ts`)
- Student page workflows → Execution logger: logs workflow (evidence: `src/pages/StudentPage.ts`)
- Account storage → Execution logger: logs storage result (evidence: `src/utils/AccountStorageHelper.ts`)
- Verification helpers → InstuLearn QA site: verifies page state
- Quiz scenarios → InstuLearn QA site: tests UI (evidence: `Readme.md`)
