# andriifrolov/playwright-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/andriifrolov/playwright-portfolio
- Repository: https://github.com/andriifrolov/playwright-portfolio

## Overview

This repository is a Playwright test framework for the DemoQA bookstore. Its principal workflow is running functional tests against bookstore, login, and profile page objects; a separate accessibility suite scans pages and attaches reports. The framework also provides reusable page fragments, book test data, and environment-dependent data selection. The README documents fixture-based injection of the accessibility report builder. Test implementations and fixture wiring were not sampled, so those connections are not asserted here.

Main entry points: [`framework/pages/bookstore/BookSummaryFragment.ts`](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/bookstore/BookSummaryFragment.ts) (Book summary), [`framework/pages/profile/BookRow.ts`](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/profile/BookRow.ts) (Profile book row), [`framework/pages/bookstore`](https://github.com/andriifrolov/playwright-portfolio/tree/master/framework/pages/bookstore) (Bookstore pages), [`framework/pages/profile/ProfilePage.ts`](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/profile/ProfilePage.ts) (Profile page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_suites["Test suites"]
  node_functional["Functional tests"]
  node_accessibility["Accessibility tests"]
end

subgraph group_pages["Page objects"]
  node_bookstore["Bookstore pages"]
  node_login["Login page<br/>[LoginPage.ts]"]
  node_profile["Profile page<br/>[ProfilePage.ts]"]
  node_summary["Book summary"]
  node_bookrow["Profile book row<br/>[BookRow.ts]"]
end

subgraph group_framework["Framework support"]
  node_basepage["Base page<br/>[BasePage.ts]"]
  node_basefragment["Base fragment<br/>[BaseFragment.ts]"]
  node_bookdto["Book data type<br/>[Book.dto.ts]"]
  node_testdata["Book test data"]
  node_a11report["A11 report builder"]
  node_book_data_files["Book data files"]
end

node_engineer(("Test author"))
node_axe["Axe accessibility engine"]
node_bookstore_site["DemoQA bookstore"]

node_bookstore -->|"creates rows"| node_summary
node_profile -->|"creates rows"| node_summary
node_profile -->|"creates links"| node_bookrow
node_summary -->|"extends"| node_basefragment
node_bookrow -->|"extends"| node_basefragment
node_bookstore -->|"imports"| node_bookrow
node_summary -->|"checks book data"| node_bookdto
node_testdata -->|"types data"| node_bookdto
node_testdata -->|"loads by environment"| node_book_data_files
node_a11report -->|"runs scans"| node_axe
node_engineer -.->|"authors"| node_functional
node_engineer -.->|"authors"| node_accessibility
node_accessibility -->|"fixture injects"| node_a11report
node_functional -->|"tests against"| node_bookstore_site

click node_functional "https://github.com/andriifrolov/playwright-portfolio/tree/master/tests/functional"
click node_accessibility "https://github.com/andriifrolov/playwright-portfolio/tree/master/tests/a11"
click node_bookstore "https://github.com/andriifrolov/playwright-portfolio/tree/master/framework/pages/bookstore"
click node_login "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/signin/LoginPage.ts"
click node_profile "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/profile/ProfilePage.ts"
click node_summary "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/bookstore/BookSummaryFragment.ts"
click node_bookrow "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/profile/BookRow.ts"
click node_basepage "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/BasePage.ts"
click node_basefragment "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/BaseFragment.ts"
click node_bookdto "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/dto/Book.dto.ts"
click node_testdata "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/utils/TestDataProvider.ts"
click node_a11report "https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/a11/A11ReportBuilder.ts"
click node_book_data_files "https://github.com/andriifrolov/playwright-portfolio/tree/master/framework/resources/testdata"

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_functional,node_accessibility toneBlue
class node_bookstore,node_login,node_profile,node_summary,node_bookrow toneAmber
class node_basepage,node_basefragment,node_bookdto,node_testdata,node_a11report,node_book_data_files toneMint
class node_engineer,node_axe,node_bookstore_site toneIndigo
```

## Components

### Test suites

- [Functional tests](https://github.com/andriifrolov/playwright-portfolio/tree/master/tests/functional): `tests/functional`
- [Accessibility tests](https://github.com/andriifrolov/playwright-portfolio/tree/master/tests/a11): `tests/a11`

### Page objects

- [Bookstore pages](https://github.com/andriifrolov/playwright-portfolio/tree/master/framework/pages/bookstore): `framework/pages/bookstore`
- [Login page](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/signin/LoginPage.ts): `framework/pages/signin/LoginPage.ts`
- [Profile page](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/profile/ProfilePage.ts): `framework/pages/profile/ProfilePage.ts`
- [Book summary](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/bookstore/BookSummaryFragment.ts): `framework/pages/bookstore/BookSummaryFragment.ts`
- [Profile book row](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/profile/BookRow.ts): `framework/pages/profile/BookRow.ts`

### Framework support

- [Base page](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/BasePage.ts): `framework/pages/BasePage.ts`
- [Base fragment](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/pages/BaseFragment.ts): `framework/pages/BaseFragment.ts`
- [Book data type](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/dto/Book.dto.ts): `framework/dto/Book.dto.ts`
- [Book test data](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/utils/TestDataProvider.ts): `framework/utils/TestDataProvider.ts`
- [A11 report builder](https://github.com/andriifrolov/playwright-portfolio/blob/master/framework/a11/A11ReportBuilder.ts): `framework/a11/A11ReportBuilder.ts`
- [Book data files](https://github.com/andriifrolov/playwright-portfolio/tree/master/framework/resources/testdata): data · `framework/resources/testdata`

### Other components

- **Test author**
- **Axe accessibility engine**
- **DemoQA bookstore**

## Connections

- Bookstore pages → Book summary: creates rows (evidence: `framework/pages/bookstore/BookStorePage.ts`)
- Profile page → Book summary: creates rows (evidence: `framework/pages/profile/ProfilePage.ts`)
- Profile page → Profile book row: creates links (evidence: `framework/pages/profile/ProfilePage.ts`)
- Book summary → Base fragment: extends (evidence: `framework/pages/bookstore/BookSummaryFragment.ts`)
- Profile book row → Base fragment: extends (evidence: `framework/pages/profile/BookRow.ts`)
- Bookstore pages → Profile book row: imports (evidence: `framework/pages/bookstore/BookStorePage.ts`)
- Book summary → Book data type: checks book data (evidence: `framework/pages/bookstore/BookSummaryFragment.ts`)
- Book test data → Book data type: types data (evidence: `framework/utils/TestDataProvider.ts`)
- Book test data → Book data files: loads by environment (evidence: `framework/utils/TestDataProvider.ts`)
- A11 report builder → Axe accessibility engine: runs scans (evidence: `framework/a11/A11ReportBuilder.ts`)
- Test author → Functional tests: authors
- Test author → Accessibility tests: authors
- Accessibility tests → A11 report builder: fixture injects (evidence: `README.md`)
- Functional tests → DemoQA bookstore: tests against (evidence: `README.md`)
