# lseg/ag-grid-playwright architecture

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

- Interactive diagram: https://gitdiagram.com/lseg/ag-grid-playwright
- Repository: https://github.com/lseg/ag-grid-playwright

## Overview

ag-grid-playwright is a small React/Playwright test harness for inspecting AG Grid state. The app wraps a grid in the harness, which registers the ready grid under a unique ID during E2E runs; Playwright tests then use browser-side helpers to read rows and columns through either the grid API or rendered DOM. The README also describes custom helpers for broader grid capabilities. The graph covers the sampled runtime; custom extensions are documented but have no repository implementation path.

Main entry points: [`src/src/AGGridTestHarness.tsx`](https://github.com/lseg/ag-grid-playwright/blob/main/src/src/AGGridTestHarness.tsx) (Grid harness), [`src/src/aggrid-test-util.js`](https://github.com/lseg/ag-grid-playwright/blob/main/src/src/aggrid-test-util.js) (API accessors)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_playwright(("Playwright test"))
node_harness["Grid harness"]
node_aggrid["AG Grid"]
node_api_helpers["API accessors"]
node_dom_helpers["DOM accessors"]

node_harness -->|"wraps grid"| node_aggrid
node_harness -->|"registers grid"| node_api_helpers
node_playwright -->|"calls API readers"| node_api_helpers
node_playwright -->|"calls DOM readers"| node_dom_helpers
node_api_helpers -->|"reads registered grid"| node_harness

click node_harness "https://github.com/lseg/ag-grid-playwright/blob/main/src/src/AGGridTestHarness.tsx"
click node_api_helpers "https://github.com/lseg/ag-grid-playwright/blob/main/src/src/aggrid-test-util.js"
click node_dom_helpers "https://github.com/lseg/ag-grid-playwright/blob/main/src/src/aggrid-test-util.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_playwright,node_aggrid toneIndigo
class node_harness,node_dom_helpers toneTeal
class node_api_helpers toneMint
```

## Components

### Other components

- **Playwright test**
- [Grid harness](https://github.com/lseg/ag-grid-playwright/blob/main/src/src/AGGridTestHarness.tsx): `src/src/AGGridTestHarness.tsx`
- **AG Grid**
- [API accessors](https://github.com/lseg/ag-grid-playwright/blob/main/src/src/aggrid-test-util.js): `src/src/aggrid-test-util.js`
- [DOM accessors](https://github.com/lseg/ag-grid-playwright/blob/main/src/src/aggrid-test-util.js): `src/src/aggrid-test-util.js`

## Connections

- Grid harness → AG Grid: wraps grid (evidence: `README.md`)
- Grid harness → API accessors: registers grid (evidence: `src/src/AGGridTestHarness.tsx`)
- Playwright test → API accessors: calls API readers (evidence: `README.md`)
- Playwright test → DOM accessors: calls DOM readers (evidence: `README.md`)
- API accessors → Grid harness: reads registered grid (evidence: `src/src/aggrid-test-util.js`)
