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
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:
tests/e2e/auth.setup.ts, Playwright API user,.envcredentials)Proposed first pass:
updating-blueprints.md— small scope, proves the pattern)tests/docs-screenshots/kept separate fromtests/e2e/docs/src/assets/screenshots/<page>/page.screenshot()with fixed 1440×900 viewport, consistent output pathsDetailed design:
planning/DOCS_SCREENSHOT_AUTOMATION_SPRINT.md(follow-up) will cover:Out of scope (for this issue):