# irs-jin/alaya-automation-testing architecture

> Architecture diagram of the GitHub repository irs-jin/alaya-automation-testing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/irs-jin/alaya-automation-testing
- Repository: https://github.com/irs-jin/alaya-automation-testing

## Overview

This repository is a Playwright automation suite for ALAYA ERP, with page objects for business screens and shared helpers for login, iframe discovery, and self-healing selectors. The documented user-to-result workflow is a serial browser run that logs in, navigates ERP modules, performs or verifies transactions and reports, and produces test results. The supplied tree contains no test specs or suite entry point, so the initiating test-to-page wiring cannot be shown; unsampled module coverage follows the README and filenames.

Main entry points: [`framework/selfHealingLocator.js`](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/selfHealingLocator.js) (Self-healing selectors), [`framework/frameHelper.js`](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/frameHelper.js) (Frame discovery), [`framework/pages/itemPage.js`](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/itemPage.js) (Item master), [`framework/pages/stockTakePage.js`](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/stockTakePage.js) (Stock taking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared automation"]
  node_login["Login flow<br/>[loginHelper.js]"]
  node_healing["Self-healing selectors"]
  node_fuzzy["Fuzzy matching<br/>[fuzzyMatch.js]"]
  node_frames["Frame discovery<br/>[frameHelper.js]"]
end

subgraph group_finance["Finance"]
  node_gl["Ledger and cash"]
  node_receivables["Receivables<br/>[arInvoicePage.js]"]
  node_payables["Payables<br/>[apInvoicePage.js]"]
  node_bank["Bank reconciliation"]
end

subgraph group_inventory["Inventory"]
  node_items["Item master<br/>[itemPage.js]"]
  node_stocktake["Stock taking<br/>[stockTakePage.js]"]
  node_stockmoves["Stock movements"]
end

subgraph group_purchasing["Purchasing"]
  node_purchaseorders["Purchase orders"]
  node_purchasereturns["Purchase returns"]
end

subgraph group_salespos["Sales and POS"]
  node_sales["Sales transactions<br/>[cashSalesPage.js]"]
  node_orders["Sales orders<br/>[salesOrderPage.js]"]
  node_pos["POS promotions<br/>[promotionPage.js]"]
end

subgraph group_reporting["Reports"]
  node_reports["ERP reports"]
  node_domainreports["Module reports"]
end

node_qa(("QA engineer"))
node_erp["ALAYA ERP"]

node_login -->|"finds controls"| node_healing
node_healing -->|"falls back to"| node_fuzzy
node_items -->|"finds controls"| node_healing
node_items -->|"resolves frames"| node_frames
node_stocktake -->|"finds controls"| node_healing
node_stocktake -->|"resolves frames"| node_frames
node_sales -->|"finds controls"| node_healing
node_sales -->|"resolves frames"| node_frames
node_purchaseorders -->|"finds controls"| node_healing
node_purchaseorders -->|"resolves frames"| node_frames
node_purchasereturns -->|"finds controls"| node_healing
node_purchasereturns -->|"resolves frames"| node_frames
node_login -->|"logs in"| node_erp
node_items -->|"automates screens"| node_erp
node_stocktake -->|"automates screens"| node_erp
node_sales -->|"automates screens"| node_erp
node_purchaseorders -->|"automates screens"| node_erp
node_purchasereturns -->|"automates screens"| node_erp

click node_login "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/loginHelper.js"
click node_healing "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/selfHealingLocator.js"
click node_fuzzy "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/fuzzyMatch.js"
click node_frames "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/frameHelper.js"
click node_gl "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/journalEntryPage.js"
click node_receivables "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/arInvoicePage.js"
click node_payables "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/apInvoicePage.js"
click node_bank "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/bankReconciliationPage.js"
click node_items "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/itemPage.js"
click node_stocktake "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/stockTakePage.js"
click node_stockmoves "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/stockTransferPage.js"
click node_purchaseorders "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/purchaseOrderPage.js"
click node_purchasereturns "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/purchaseReturnPage.js"
click node_sales "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/cashSalesPage.js"
click node_orders "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/salesOrderPage.js"
click node_pos "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/promotionPage.js"
click node_reports "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/generalLedgerReportPage.js"
click node_domainreports "https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/inventoryReportPage.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_login,node_healing,node_fuzzy,node_frames toneBlue
class node_gl,node_receivables,node_payables,node_bank toneAmber
class node_items,node_stocktake,node_stockmoves toneMint
class node_purchaseorders,node_purchasereturns toneRose
class node_sales,node_orders,node_pos,node_qa,node_erp toneIndigo
class node_reports,node_domainreports toneTeal
```

## Components

### Shared automation

- [Login flow](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/loginHelper.js): `framework/loginHelper.js`
- [Self-healing selectors](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/selfHealingLocator.js): `framework/selfHealingLocator.js`
- [Fuzzy matching](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/fuzzyMatch.js): `framework/fuzzyMatch.js`
- [Frame discovery](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/frameHelper.js): `framework/frameHelper.js`

### Finance

- [Ledger and cash](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/journalEntryPage.js): `framework/pages/journalEntryPage.js`
- [Receivables](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/arInvoicePage.js): `framework/pages/arInvoicePage.js`
- [Payables](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/apInvoicePage.js): `framework/pages/apInvoicePage.js`
- [Bank reconciliation](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/bankReconciliationPage.js): `framework/pages/bankReconciliationPage.js`

### Inventory

- [Item master](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/itemPage.js): `framework/pages/itemPage.js`
- [Stock taking](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/stockTakePage.js): `framework/pages/stockTakePage.js`
- [Stock movements](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/stockTransferPage.js): `framework/pages/stockTransferPage.js`

### Purchasing

- [Purchase orders](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/purchaseOrderPage.js): `framework/pages/purchaseOrderPage.js`
- [Purchase returns](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/purchaseReturnPage.js): `framework/pages/purchaseReturnPage.js`

### Sales and POS

- [Sales transactions](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/cashSalesPage.js): `framework/pages/cashSalesPage.js`
- [Sales orders](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/salesOrderPage.js): `framework/pages/salesOrderPage.js`
- [POS promotions](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/promotionPage.js): `framework/pages/promotionPage.js`

### Reports

- [ERP reports](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/generalLedgerReportPage.js): `framework/pages/generalLedgerReportPage.js`
- [Module reports](https://github.com/irs-jin/alaya-automation-testing/blob/main/framework/pages/inventoryReportPage.js): `framework/pages/inventoryReportPage.js`

### Other components

- **QA engineer**
- **ALAYA ERP**

## Connections

- Login flow → Self-healing selectors: finds controls
- Self-healing selectors → Fuzzy matching: falls back to
- Item master → Self-healing selectors: finds controls
- Item master → Frame discovery: resolves frames
- Stock taking → Self-healing selectors: finds controls
- Stock taking → Frame discovery: resolves frames
- Sales transactions → Self-healing selectors: finds controls
- Sales transactions → Frame discovery: resolves frames
- Purchase orders → Self-healing selectors: finds controls
- Purchase orders → Frame discovery: resolves frames
- Purchase returns → Self-healing selectors: finds controls
- Purchase returns → Frame discovery: resolves frames
- Login flow → ALAYA ERP: logs in
- Item master → ALAYA ERP: automates screens
- Stock taking → ALAYA ERP: automates screens
- Sales transactions → ALAYA ERP: automates screens
- Purchase orders → ALAYA ERP: automates screens
- Purchase returns → ALAYA ERP: automates screens
