mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
docs: keep screenshot artifacts out of Playwright tests
Clarify that PR and chat captures belong in ignored output and that committed visual tests require deliberate pixel assertions. Co-authored-by: Princess Donut <68157ebd23b3897c1991015c3038658ea916200c67d3a54620b0754d1b92f6e0@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
@@ -217,6 +217,14 @@ See [TESTING.md](TESTING.md) for the full multi-agent E2E guide.
|
||||
|
||||
### PR Screenshots
|
||||
|
||||
> **Screenshots for PRs, reviews, chats, and demos are disposable artifacts, not
|
||||
> tests.** Save them under ignored `test-results/` and use the standalone
|
||||
> `just desktop-screenshot` helper. Do not create or modify a committed
|
||||
> Playwright spec merely to capture evidence, and do not leave `.screenshot()`
|
||||
> calls behind: they do not assert pixels or provide regression coverage. A
|
||||
> committed visual-regression test must deliberately use a reviewed
|
||||
> `toHaveScreenshot()` baseline.
|
||||
>
|
||||
> **Do NOT use `buzz upload`, the relay media endpoint, or any third-party
|
||||
> image host for PR screenshots.** Relay media URLs fail through GitHub's camo
|
||||
> proxy. Always use `scripts/post-screenshots.sh` for PNGs before linking them
|
||||
|
||||
@@ -2,11 +2,30 @@
|
||||
name: desktop-screenshot
|
||||
description: >
|
||||
Capture desktop app screenshots and post them to GitHub PRs with immutable URLs.
|
||||
version: 1
|
||||
version: 2
|
||||
---
|
||||
|
||||
# Desktop Screenshot Skill
|
||||
|
||||
## CRITICAL: Screenshots Are Disposable Artifacts, Not Tests
|
||||
|
||||
Screenshots captured for a PR, review, chat, or demo belong under ignored
|
||||
`test-results/` (or another temporary directory). **Do not create or modify a
|
||||
committed Playwright spec just to capture evidence.** Use the standalone
|
||||
`just desktop-screenshot` helper below; if the desired state needs custom setup
|
||||
that the helper cannot express, use a temporary untracked script and delete it
|
||||
after capture.
|
||||
|
||||
A committed Playwright test must assert behavior independently of any image it
|
||||
writes. A plain `page.screenshot()` or `locator.screenshot()` does not validate
|
||||
pixels and is not regression coverage. Do not leave such calls in tests as PR
|
||||
or chat artifacts. Visual regression testing is a separate, deliberate change:
|
||||
use a reviewed `toHaveScreenshot()` baseline and account for its CI stability
|
||||
and maintenance cost.
|
||||
|
||||
Before committing screenshot work, inspect `git diff -- desktop/tests` and
|
||||
remove capture-only specs and incidental `.screenshot()` calls.
|
||||
|
||||
## CRITICAL: How to Host Screenshots for PRs
|
||||
|
||||
**NEVER use `buzz upload`, the relay media endpoint, or any third-party image
|
||||
|
||||
Reference in New Issue
Block a user