Skip to main content

Feature: End-to-End Testing

Purpose​

  • Feature name: End-to-end testing
  • Why this feature exists: Validate critical routes, evidence links, and metadata in a real browser.

Scope​

In scope​

  • route coverage across core pages
  • evidence link DOM presence and non-empty href validation (remote URL reachability is not asserted)
  • metadata endpoints where applicable

Out of scope​

  • unit test logic
  • performance budgets
  • live external URL reachability assertions (handled by a separate monitor)

Prereqs / Inputs​

  • Playwright configured in the app
  • test base URL configured for CI

Procedure / Content​

Feature summary​

  • Feature name: End-to-end testing
  • Feature group: Testing and quality gates
  • Technical summary: Runs Playwright suites against core routes, evidence links, and key endpoints.
  • Low-tech summary: Browser-based tests confirm the site works like a user expects.

Feature in action​

  • Where to see it working: pnpm test:e2e in the app repo.
  • Related live monitor: pnpm links:check:external (scheduled/on-demand workflow, non-blocking for PRs).

Confirmation Process​

Manual​

  • Steps: Run pnpm test:e2e locally or against staging.
  • What to look for: All routes return HTTP < 400; evidence link elements render in the DOM with non-empty href attributes (remote URL reachability is not asserted by the test suite).
  • Artifacts or reports to inspect: Playwright HTML report on failures.

Tests​

Potential behavior if broken or misconfigured​

  • E2E tests skipped due to missing browsers or base URL.
  • Route failures due to bad slugs or links.

Long-term maintenance notes​

  • Keep tests aligned with route additions.
  • Update Playwright config when environments change.

Dependencies, libraries, tools​

  • Playwright
  • Node.js
  • pnpm

Source code references (GitHub URLs)​

ADRs​

  • None.

Runbooks​

Additional internal references​

Validation / Expected outcomes​

  • E2E tests pass for core routes (HTTP < 400) and API endpoints.
  • Evidence link elements render in the DOM with non-empty href attributes; remote connectivity to the docs site or GitHub is not verified by the test suite.

Failure modes / Troubleshooting​

  • Browser failures: reinstall Playwright browsers or use CI runners.
  • External URL outage/noise: use the external-link monitor results for triage, not PR-blocking E2E failures.

References​

  • None.