Skip to content

Automate docs screenshots with Playwright #19

@deanleigh

Description

@deanleigh

The UpDoc docs are text-heavy. A visual tool deserves visual documentation, but manually captured screenshots rot fast — every UI tweak invalidates them. Playwright can drive the backoffice through documented flows and capture screenshots at predetermined moments, regenerated on demand.

Groundwork already done: planning/DOCS_SCREENSHOT_AUTOMATION.md (merged in #18) captures the high-level idea. This issue is for the detailed design + implementation.

Why Playwright fits:

  • Authentication already solved (tests/e2e/auth.setup.ts, Playwright API user, .env credentials)
  • Known test content exists (Winchester PDFs, Group Tours tree)
  • Screenshots regenerate from actual flows — stay in sync with reality
  • One command rebuilds all docs imagery

Proposed first pass:

  • Pick one docs page (candidate: updating-blueprints.md — small scope, proves the pattern)
  • New folder tests/docs-screenshots/ kept separate from tests/e2e/
  • Screenshots saved to docs/src/assets/screenshots/<page>/
  • Helper wrapping page.screenshot() with fixed 1440×900 viewport, consistent output paths
  • No separate Playwright config yet — prove the approach first, extract framework later

Detailed design: planning/DOCS_SCREENSHOT_AUTOMATION_SPRINT.md (follow-up) will cover:

  • Test site prerequisites (running site, seeded workflow, clean state)
  • Viewport / theme / annotation decisions
  • Per-page screenshot spec structure
  • How screenshots are referenced from markdown
  • Review workflow (diffing PNGs in PRs)
  • Generalisation path after first page works

Out of scope (for this issue):

  • Video / GIF captures — future issue
  • Localised docs — future
  • Visual regression testing — this is artefact generation, not assertion

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions