# vbhatt99/playwright-typescript architecture

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

- Interactive diagram: https://gitdiagram.com/vbhatt99/playwright-typescript
- Repository: https://github.com/vbhatt99/playwright-typescript

## Overview

This repository is a Playwright/TypeScript end-to-end testing framework. Its principal workflow is to select tests (optionally by tag), run them across configured browsers, and inspect generated reports and failure artifacts. Reusable page objects and typed test data support test authoring; the sampled source confirms the LoginPage-to-BasePage relationship. Broader test, fixture, and reporting capabilities are documented in the README, but their runtime wiring is not shown in the sampled source.

Main entry points: [`src/pages/login-page.ts`](https://github.com/vbhatt99/playwright-typescript/blob/main/src/pages/login-page.ts) (Login page object), [`playwright.config.ts`](https://github.com/vbhatt99/playwright-typescript/blob/main/playwright.config.ts) (Browser configuration), [`src/pages/base-page.ts`](https://github.com/vbhatt99/playwright-typescript/blob/main/src/pages/base-page.ts) (Base page actions), [`tests/basic.spec.ts`](https://github.com/vbhatt99/playwright-typescript/blob/main/tests/basic.spec.ts) (Basic tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Test execution"]
  node_test_runner["Playwright runner"]
  node_test_config["Browser configuration"]
  node_tag_selection["Tag selection"]
  node_browser_engines["Chromium and WebKit"]
end

subgraph group_scenarios["Test scenarios"]
  node_local_tests["Basic tests<br/>[basic.spec.ts]"]
  node_site_tests["External-site tests"]
  node_demo_tests["Todo demo test"]
end

subgraph group_automation["Reusable automation"]
  node_base_page["Base page actions<br/>[base-page.ts]"]
  node_login_page["Login page object<br/>[login-page.ts]"]
  node_type_definitions["Shared types<br/>[index.ts]"]
end

subgraph group_data["Test data and results"]
  node_test_data["Typed test data<br/>[test-data.ts]"]
  node_fixtures["Response fixtures"]
  node_reports["Test reports"]
  node_artifacts["Failure artifacts"]
end

node_engineer(("Test author"))

node_engineer -->|"starts tests"| node_test_runner
node_test_runner -->|"uses settings"| node_test_config
node_test_config -->|"configures projects"| node_browser_engines
node_test_runner -->|"filters tests"| node_tag_selection
node_test_runner -->|"runs tests"| node_local_tests
node_test_runner -->|"runs tests"| node_site_tests
node_test_runner -.->|"runs tests"| node_demo_tests
node_login_page -->|"extends"| node_base_page
node_base_page -->|"uses options"| node_type_definitions
node_login_page -->|"uses User type"| node_type_definitions
node_test_runner -->|"produces reports"| node_reports
node_test_runner -->|"captures failures"| node_artifacts
node_test_data -.->|"supplies data"| node_local_tests
node_fixtures -.->|"supports fixture tests"| node_site_tests

click node_test_config "https://github.com/vbhatt99/playwright-typescript/blob/main/playwright.config.ts"
click node_tag_selection "https://github.com/vbhatt99/playwright-typescript/blob/main/playwright.config.ts"
click node_local_tests "https://github.com/vbhatt99/playwright-typescript/blob/main/tests/basic.spec.ts"
click node_site_tests "https://github.com/vbhatt99/playwright-typescript/tree/main/tests"
click node_demo_tests "https://github.com/vbhatt99/playwright-typescript/blob/main/tests-examples/demo-todo-app.spec.ts"
click node_base_page "https://github.com/vbhatt99/playwright-typescript/blob/main/src/pages/base-page.ts"
click node_login_page "https://github.com/vbhatt99/playwright-typescript/blob/main/src/pages/login-page.ts"
click node_type_definitions "https://github.com/vbhatt99/playwright-typescript/blob/main/src/types/index.ts"
click node_test_data "https://github.com/vbhatt99/playwright-typescript/blob/main/src/fixtures/test-data.ts"
click node_fixtures "https://github.com/vbhatt99/playwright-typescript/tree/main/fixtures"

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_test_runner,node_test_config,node_tag_selection,node_browser_engines toneBlue
class node_local_tests,node_site_tests,node_demo_tests toneAmber
class node_base_page,node_login_page,node_type_definitions toneMint
class node_test_data,node_fixtures,node_reports,node_artifacts toneRose
class node_engineer toneIndigo
```

## Components

### Test execution

- **Playwright runner**
- [Browser configuration](https://github.com/vbhatt99/playwright-typescript/blob/main/playwright.config.ts): `playwright.config.ts`
- [Tag selection](https://github.com/vbhatt99/playwright-typescript/blob/main/playwright.config.ts): `playwright.config.ts`
- **Chromium and WebKit**

### Test scenarios

- [Basic tests](https://github.com/vbhatt99/playwright-typescript/blob/main/tests/basic.spec.ts): `tests/basic.spec.ts`
- [External-site tests](https://github.com/vbhatt99/playwright-typescript/tree/main/tests): `tests`
- [Todo demo test](https://github.com/vbhatt99/playwright-typescript/blob/main/tests-examples/demo-todo-app.spec.ts): `tests-examples/demo-todo-app.spec.ts`

### Reusable automation

- [Base page actions](https://github.com/vbhatt99/playwright-typescript/blob/main/src/pages/base-page.ts): `src/pages/base-page.ts`
- [Login page object](https://github.com/vbhatt99/playwright-typescript/blob/main/src/pages/login-page.ts): `src/pages/login-page.ts`
- [Shared types](https://github.com/vbhatt99/playwright-typescript/blob/main/src/types/index.ts): `src/types/index.ts`

### Test data and results

- [Typed test data](https://github.com/vbhatt99/playwright-typescript/blob/main/src/fixtures/test-data.ts): `src/fixtures/test-data.ts`
- [Response fixtures](https://github.com/vbhatt99/playwright-typescript/tree/main/fixtures): `fixtures`
- **Test reports**
- **Failure artifacts**

### Other components

- **Test author**

## Connections

- Test author → Playwright runner: starts tests (evidence: `README.md`)
- Playwright runner → Browser configuration: uses settings (evidence: `playwright.config.ts`)
- Browser configuration → Chromium and WebKit: configures projects (evidence: `playwright.config.ts`)
- Playwright runner → Tag selection: filters tests (evidence: `playwright.config.ts`)
- Playwright runner → Basic tests: runs tests (evidence: `README.md`)
- Playwright runner → External-site tests: runs tests (evidence: `README.md`)
- Playwright runner → Todo demo test: runs tests
- Login page object → Base page actions: extends (evidence: `src/pages/login-page.ts`)
- Base page actions → Shared types: uses options (evidence: `src/pages/base-page.ts`)
- Login page object → Shared types: uses User type (evidence: `src/pages/login-page.ts`)
- Playwright runner → Test reports: produces reports (evidence: `README.md`)
- Playwright runner → Failure artifacts: captures failures (evidence: `README.md`)
- Typed test data → Basic tests: supplies data
- Response fixtures → External-site tests: supports fixture tests
