# moodeh2001/orange-hrm-automation architecture

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

- Interactive diagram: https://gitdiagram.com/moodeh2001/orange-hrm-automation
- Repository: https://github.com/moodeh2001/orange-hrm-automation

## Overview

This repository is a Python/Playwright UI automation suite for the OrangeHRM demo. Its principal workflow is to run Chromium tests that authenticate, exercise employee creation and search, verify results, and clean up created records. The README also documents login validation, logout, navigation popups, and employee-filter cases. The sampled fixture and helper sources show authentication and employee cleanup orchestration; test-module calls were not sampled, so their links to helpers are shown as unverified.

Main entry points: [`helpers/employees.py`](https://github.com/moodeh2001/orange-hrm-automation/blob/main/helpers/employees.py) (Employee operations), [`helpers/auth.py`](https://github.com/moodeh2001/orange-hrm-automation/blob/main/helpers/auth.py) (Authentication), [`conftest.py`](https://github.com/moodeh2001/orange-hrm-automation/blob/main/conftest.py) (Page and employee fixtures), [`tests/test_login.py`](https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_login.py) (Login tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenarios["Test scenarios"]
  node_login_tests["Login tests<br/>[test_login.py]"]
  node_employee_tests["Employee tests<br/>[test_employees.py]"]
  node_search_tests["PIM search tests<br/>[test_pim_search.py]"]
  node_navigation_tests["Navigation tests<br/>[test_navigation.py]"]
end

subgraph group_automation["Automation helpers"]
  node_auth["Authentication<br/>[auth.py]"]
  node_employee_helpers["Employee operations<br/>[employees.py]"]
end

subgraph group_fixtures["Fixtures"]
  node_fixtures["Page and employee fixtures<br/>[conftest.py]"]
end

node_qa(("QA engineer"))
node_runner["pytest runner"]
node_orangehrm["OrangeHRM demo"]

node_qa -->|"runs tests"| node_runner
node_runner -.->|"runs"| node_login_tests
node_runner -.->|"runs"| node_employee_tests
node_runner -.->|"runs"| node_search_tests
node_runner -.->|"runs"| node_navigation_tests
node_fixtures -->|"calls login"| node_auth
node_fixtures -->|"creates and cleans"| node_employee_helpers
node_employee_helpers -->|"uses base URL"| node_auth
node_login_tests -.->|"uses"| node_auth
node_employee_tests -.->|"uses fixtures"| node_fixtures
node_search_tests -.->|"uses"| node_employee_helpers
node_navigation_tests -.->|"tests popups"| node_orangehrm
node_auth -->|"authenticates"| node_orangehrm
node_employee_helpers -->|"manages employees"| node_orangehrm

click node_login_tests "https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_login.py"
click node_employee_tests "https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_employees.py"
click node_search_tests "https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_pim_search.py"
click node_navigation_tests "https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_navigation.py"
click node_auth "https://github.com/moodeh2001/orange-hrm-automation/blob/main/helpers/auth.py"
click node_employee_helpers "https://github.com/moodeh2001/orange-hrm-automation/blob/main/helpers/employees.py"
click node_fixtures "https://github.com/moodeh2001/orange-hrm-automation/blob/main/conftest.py"

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_login_tests,node_employee_tests,node_search_tests,node_navigation_tests toneBlue
class node_auth,node_employee_helpers toneAmber
class node_fixtures toneMint
class node_qa,node_runner,node_orangehrm toneIndigo
```

## Components

### Test scenarios

- [Login tests](https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_login.py): `tests/test_login.py`
- [Employee tests](https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_employees.py): `tests/test_employees.py`
- [PIM search tests](https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_pim_search.py): `tests/test_pim_search.py`
- [Navigation tests](https://github.com/moodeh2001/orange-hrm-automation/blob/main/tests/test_navigation.py): `tests/test_navigation.py`

### Automation helpers

- [Authentication](https://github.com/moodeh2001/orange-hrm-automation/blob/main/helpers/auth.py): `helpers/auth.py`
- [Employee operations](https://github.com/moodeh2001/orange-hrm-automation/blob/main/helpers/employees.py): `helpers/employees.py`

### Fixtures

- [Page and employee fixtures](https://github.com/moodeh2001/orange-hrm-automation/blob/main/conftest.py): `conftest.py`

### Other components

- **QA engineer**
- **pytest runner**
- **OrangeHRM demo**

## Connections

- QA engineer → pytest runner: runs tests (evidence: `README.md`)
- pytest runner → Login tests: runs
- pytest runner → Employee tests: runs
- pytest runner → PIM search tests: runs
- pytest runner → Navigation tests: runs
- Page and employee fixtures → Authentication: calls login (evidence: `conftest.py`)
- Page and employee fixtures → Employee operations: creates and cleans (evidence: `conftest.py`)
- Employee operations → Authentication: uses base URL (evidence: `helpers/employees.py`)
- Login tests → Authentication: uses
- Employee tests → Page and employee fixtures: uses fixtures
- PIM search tests → Employee operations: uses
- Navigation tests → OrangeHRM demo: tests popups
- Authentication → OrangeHRM demo: authenticates (evidence: `helpers/auth.py`)
- Employee operations → OrangeHRM demo: manages employees (evidence: `helpers/employees.py`)
