# dfe-digital/fh-connect-families-support-testing architecture

> Architecture diagram of the GitHub repository dfe-digital/fh-connect-families-support-testing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dfe-digital/fh-connect-families-support-testing
- Repository: https://github.com/dfe-digital/fh-connect-families-support-testing

## Overview

##### Project type and purpose
- This is a test-automation repository (“fh-connect-families-support-testing”) built on Node.js/Yarn and Cypress.
- Its sole purpose is to validate the Referral Service and Dashboard applications across development and test environments, via end-to-end and regression suites.

##### File structure
- Top-level tooling/config:
- .github/workflows/test-referralUi-regression.yml → CI pipeline for regression on GitHub Actions
- config.json → likely hostnames, API keys or environment flags
- package.json / yarn.lock → Node dependencies (Cypress, plugins)
- Cypress test organization:
- cypress/e2e/01-referral-service/... → grouped by feature (Dashboard, Professional Form, Service Directory Filters, VCS Dashboard, end-to-end tests)
- cypress/fixtures → test data (Excel, JSON)
- cypress/support → custom commands and global hooks (adminCommands.js, apiCommands.js, referralCommands.js)
- No backend code here—tests invoke deployed applications or local instances.

##### README insights
- Describes two target applications (Referral service, Dashboard) and two environments (development on “develop” branch; test on “main”).
- Cypress tests are invoked via Yarn scripts, and regression is automated through GitHub Actions.

##### Elements
- Developer → Yarn script → Cypress
- Cypress → SUT (HTTP / UI)
- GitHub Actions → Yarn install / cypress run
- Cypress → Report Store
- Rectangles for compute components (Developer, CI, Cypress)
- Rounded rectangles for external systems (Referral Service, Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Developer["Developer Workstation\n(Node.js & Yarn)"]:::compute
    subgraph "Local Workspace"
        EnvConfig["Environment Configuration\n(config.json, cypress.config.js)"]:::data
        CypressRunner["Cypress Test Runner"]:::compute
        subgraph "Support Layer"
            SupportCommands["Cypress Custom Commands"]:::abstraction
            GlobalHooks["Global Hooks & Extensions"]:::abstraction
        end
        subgraph "Test Data"
            Fixtures["Test Data Fixtures"]:::data
        end
        subgraph "Test Suites"
            LaDashboard["LaDashboardPageSpecs"]:::compute
            ProfessionalForm["ProfessionalFormPageSpecs"]:::compute
            ServiceDirectory["ServiceDirectoryFiltersSpecs"]:::compute
            VCSDashboard["VCSDashboardPageSpecs"]:::compute
            E2ETests["End-to-End Scenario Specs"]:::compute
        end
    end
    subgraph "System Under Test"
        ReferralUI["Referral Service UI (dev/test)"]:::external
        DashboardUI["Dashboard UI (dev/test)"]:::external
    end
    subgraph "CI/CD Pipeline"
        CI["GitHub Actions Workflow"]:::ci
    end
    ReportStore["Report & Artifact Store"]:::data
    Repository["Repository Metadata"]:::data

    Developer -->|"runs yarn scripts"| CypressRunner
    Developer --> Repository
    CI -->|"on merge/main"| Repository
    CI -->|"installs & runs yarn"| CypressRunner
    CypressRunner -->|uses| EnvConfig
    CypressRunner -->|loads| SupportCommands
    CypressRunner -->|loads| GlobalHooks
    CypressRunner -->|loads| Fixtures
    CypressRunner -->|executes| LaDashboard
    CypressRunner -->|executes| ProfessionalForm
    CypressRunner -->|executes| ServiceDirectory
    CypressRunner -->|executes| VCSDashboard
    CypressRunner -->|executes| E2ETests
    CypressRunner -->|tests HTTP/UI| ReferralUI
    CypressRunner -->|tests HTTP/UI| DashboardUI
    CypressRunner -->|outputs results to| ReportStore

    click Developer "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/package.json"
    click EnvConfig "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/config.json"
    click CypressRunner "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/cypress.config.js"
    click CI "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/.github/workflows/test-referralUi-regression.yml"
    click LaDashboard "https://github.com/dfe-digital/fh-connect-families-support-testing/tree/main/cypress/e2e/01-referral-service/LaDashboardPageSpecs"
    click ProfessionalForm "https://github.com/dfe-digital/fh-connect-families-support-testing/tree/main/cypress/e2e/01-referral-service/ProfessionalFormPageSpecs"
    click ServiceDirectory "https://github.com/dfe-digital/fh-connect-families-support-testing/tree/main/cypress/e2e/01-referral-service/ServiceDirectoryFiltersSpecs"
    click VCSDashboard "https://github.com/dfe-digital/fh-connect-families-support-testing/tree/main/cypress/e2e/01-referral-service/VCSDashboardPageSpecs"
    click E2ETests "https://github.com/dfe-digital/fh-connect-families-support-testing/tree/main/cypress/e2e/01-referral-service/e2eTests"
    click Fixtures "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/cypress/fixtures/example.json"
    click SupportCommands "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/cypress/support/commands.js"
    click GlobalHooks "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/cypress/support/e2e.js"
    click Repository "https://github.com/dfe-digital/fh-connect-families-support-testing/blob/main/README.md"

    classDef compute fill:#AEE,stroke:#333,stroke-width:1px
    classDef data fill:#FFE,stroke:#333,stroke-width:1px
    classDef abstraction fill:#EEC,stroke:#333,stroke-width:1px
    classDef ci fill:#ECA,stroke:#333,stroke-width:1px
    classDef external fill:#CFE,stroke:#333,stroke-width:1px
```
