# ahmed-9595/playwright-typescript-hybrid-framework architecture

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

- Interactive diagram: https://gitdiagram.com/ahmed-9595/playwright-typescript-hybrid-framework
- Repository: https://github.com/ahmed-9595/playwright-typescript-hybrid-framework

## Overview

This repository is a Playwright/TypeScript hybrid test-automation framework for OrangeHRM. Its principal workflow is to run UI, API, or combined API-setup/UI-verification tests, using fixtures, API services, and page objects to prepare and exercise employee records. The graph includes the documented data-driven, authentication, and reusable-action layers. Several test, fixture, and data relationships are described only at framework level in the README; those links are marked as documented rather than inferred from unsampled test code.

Main entry points: [`tests/UITest`](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/tests/UITest) (UI suites), [`tests/APITest`](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/tests/APITest) (API suites), [`API+UI/pages/ContactDetailsPage.ts`](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/ContactDetailsPage.ts) (Contact details), [`API+UI/pages/JobDetailsPage.ts`](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/JobDetailsPage.ts) (Job details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflows["Test workflows"]
  node_ui_tests["UI suites"]
  node_api_tests["API suites"]
  node_auth_setup["Auth setup<br/>[auth.setup.ts]"]
end

subgraph group_ui["UI automation"]
  node_login_page["Login page<br/>[LoginPage.ts]"]
  node_pim_page["Employee navigation<br/>[PIMPage.ts]"]
  node_contact_page["Contact details"]
  node_job_page["Job details<br/>[JobDetailsPage.ts]"]
end

subgraph group_api["API automation"]
  node_add_service["Add employee API<br/>[AddEmployee.ts]"]
  node_personal_service["Personal details API<br/>[PersonalDetails.ts]"]
  node_add_payload["Employee payload<br/>[AddEmployee.ts]"]
  node_personal_payload["Personal details payload"]
end

subgraph group_support["Shared support"]
  node_fixtures["Custom fixtures<br/>[Fixture.ts]"]
  node_actions["Browser actions<br/>[Actions.ts]"]
  node_contact_builder["Contact data builder"]
  node_job_builder["Job data builder"]
  node_contact_type["Contact data type"]
  node_job_type["Job data type<br/>[JobDetailsData.ts]"]
  node_ui_data["UI test data"]
end

node_tester(("Test runner"))
node_orangehrm["OrangeHRM"]

node_tester -->|"runs"| node_ui_tests
node_tester -->|"runs"| node_api_tests
node_ui_tests -.->|"uses fixtures"| node_fixtures
node_api_tests -.->|"uses fixtures"| node_fixtures
node_auth_setup -.->|"establishes login"| node_login_page
node_ui_tests -.->|"drives pages"| node_login_page
node_ui_tests -.->|"drives pages"| node_pim_page
node_ui_tests -.->|"drives pages"| node_contact_page
node_ui_tests -.->|"drives pages"| node_job_page
node_contact_page -->|"uses actions"| node_actions
node_job_page -->|"uses actions"| node_actions
node_login_page -->|"uses actions"| node_actions
node_contact_page -->|"accepts data"| node_contact_type
node_job_page -->|"accepts data"| node_job_type
node_contact_builder -->|"builds data"| node_contact_type
node_job_builder -->|"builds data"| node_job_type
node_ui_tests -.->|"generates test data"| node_contact_builder
node_ui_tests -.->|"generates test data"| node_job_builder
node_ui_tests -.->|"uses JSON data"| node_ui_data
node_api_tests -.->|"calls service"| node_add_service
node_api_tests -.->|"calls service"| node_personal_service
node_add_service -->|"loads payload"| node_add_payload
node_personal_service -->|"loads payload"| node_personal_payload
node_add_service -->|"posts employee"| node_orangehrm
node_personal_service -->|"updates details"| node_orangehrm

click node_ui_tests "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/tests/UITest"
click node_api_tests "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/tests/APITest"
click node_auth_setup "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/tests/auth.setup.ts"
click node_fixtures "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/fixtures/Fixture.ts"
click node_login_page "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/LoginPage.ts"
click node_pim_page "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/PIMPage.ts"
click node_contact_page "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/ContactDetailsPage.ts"
click node_job_page "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/JobDetailsPage.ts"
click node_actions "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/utils/Actions.ts"
click node_contact_builder "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/UI/builder/ContactDetailsDataBuilder.ts"
click node_job_builder "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/UI/builder/JobDetailsDataBuilder.ts"
click node_contact_type "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/types/ContactsDetailsData.ts"
click node_job_type "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/types/JobDetailsData.ts"
click node_ui_data "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/API%2BUI/data/UI"
click node_add_service "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/services/AddEmployee.ts"
click node_personal_service "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/services/PersonalDetails.ts"
click node_add_payload "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/API/AddEmployee.ts"
click node_personal_payload "https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/API/EditPersonalDetails.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_ui_tests,node_api_tests,node_auth_setup toneBlue
class node_login_page,node_pim_page,node_contact_page,node_job_page toneAmber
class node_add_service,node_personal_service,node_add_payload,node_personal_payload toneMint
class node_fixtures,node_actions,node_contact_builder,node_job_builder,node_contact_type,node_job_type,node_ui_data toneRose
class node_tester,node_orangehrm toneIndigo
```

## Components

### Test workflows

- [UI suites](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/tests/UITest): `tests/UITest`
- [API suites](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/tests/APITest): `tests/APITest`
- [Auth setup](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/tests/auth.setup.ts): `tests/auth.setup.ts`

### UI automation

- [Login page](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/LoginPage.ts): `API+UI/pages/LoginPage.ts`
- [Employee navigation](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/PIMPage.ts): `API+UI/pages/PIMPage.ts`
- [Contact details](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/ContactDetailsPage.ts): `API+UI/pages/ContactDetailsPage.ts`
- [Job details](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/pages/JobDetailsPage.ts): `API+UI/pages/JobDetailsPage.ts`

### API automation

- [Add employee API](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/services/AddEmployee.ts): `API+UI/services/AddEmployee.ts`
- [Personal details API](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/services/PersonalDetails.ts): `API+UI/services/PersonalDetails.ts`
- [Employee payload](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/API/AddEmployee.ts): `API+UI/data/API/AddEmployee.ts`
- [Personal details payload](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/API/EditPersonalDetails.ts): `API+UI/data/API/EditPersonalDetails.ts`

### Shared support

- [Custom fixtures](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/fixtures/Fixture.ts): `API+UI/fixtures/Fixture.ts`
- [Browser actions](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/utils/Actions.ts): `API+UI/utils/Actions.ts`
- [Contact data builder](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/UI/builder/ContactDetailsDataBuilder.ts): `API+UI/data/UI/builder/ContactDetailsDataBuilder.ts`
- [Job data builder](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/data/UI/builder/JobDetailsDataBuilder.ts): `API+UI/data/UI/builder/JobDetailsDataBuilder.ts`
- [Contact data type](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/types/ContactsDetailsData.ts): `API+UI/types/ContactsDetailsData.ts`
- [Job data type](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/blob/main/API%2BUI/types/JobDetailsData.ts): `API+UI/types/JobDetailsData.ts`
- [UI test data](https://github.com/ahmed-9595/playwright-typescript-hybrid-framework/tree/main/API%2BUI/data/UI): `API+UI/data/UI`

### Other components

- **Test runner**
- **OrangeHRM**

## Connections

- Test runner → UI suites: runs (evidence: `README.md`)
- Test runner → API suites: runs (evidence: `README.md`)
- UI suites → Custom fixtures: uses fixtures (evidence: `README.md`)
- API suites → Custom fixtures: uses fixtures (evidence: `README.md`)
- Auth setup → Login page: establishes login (evidence: `README.md`)
- UI suites → Login page: drives pages (evidence: `README.md`)
- UI suites → Employee navigation: drives pages (evidence: `README.md`)
- UI suites → Contact details: drives pages (evidence: `README.md`)
- UI suites → Job details: drives pages (evidence: `README.md`)
- Contact details → Browser actions: uses actions (evidence: `API+UI/pages/ContactDetailsPage.ts`)
- Job details → Browser actions: uses actions (evidence: `API+UI/pages/JobDetailsPage.ts`)
- Login page → Browser actions: uses actions (evidence: `API+UI/pages/LoginPage.ts`)
- Contact details → Contact data type: accepts data (evidence: `API+UI/pages/ContactDetailsPage.ts`)
- Job details → Job data type: accepts data (evidence: `API+UI/pages/JobDetailsPage.ts`)
- Contact data builder → Contact data type: builds data (evidence: `API+UI/data/UI/builder/ContactDetailsDataBuilder.ts`)
- Job data builder → Job data type: builds data (evidence: `API+UI/data/UI/builder/JobDetailsDataBuilder.ts`)
- UI suites → Contact data builder: generates test data (evidence: `README.md`)
- UI suites → Job data builder: generates test data (evidence: `README.md`)
- UI suites → UI test data: uses JSON data (evidence: `README.md`)
- API suites → Add employee API: calls service (evidence: `README.md`)
- API suites → Personal details API: calls service (evidence: `README.md`)
- Add employee API → Employee payload: loads payload (evidence: `API+UI/services/AddEmployee.ts`)
- Personal details API → Personal details payload: loads payload (evidence: `API+UI/services/PersonalDetails.ts`)
- Add employee API → OrangeHRM: posts employee (evidence: `API+UI/services/AddEmployee.ts`)
- Personal details API → OrangeHRM: updates details (evidence: `API+UI/services/PersonalDetails.ts`)
