算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
test-visual-regression【设计与创意】Set up Playwright screenshot baselines and CI diffing so UI changes fail pixel by pixel instead of by eye. Use when "add visual regression tests" or "catch UI regressions". Functional clicks → test-playwright.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Degree of freedom: MIXED — what to baseline [HIGH freedom];
determinism loop and 3× clean runs [LOW freedom — run exactly].
playwright-cli / project runner — never Playwright MCP.
Establish a screenshot baseline for important UI states and wire diffing so unintended visual change fails CI.
Functional tests prove the button works; visual tests prove it didn't move, shrink, lose styling, or overlap the next element.
Use playwright-cli (npx --yes @playwright/cli@latest) and the project's
Playwright test runner — never Playwright MCP. Read
protocol-browser-anti-stall before any headed session.
| Skill | Owns |
|---|---|
| test-visual-regression (this) | Pixel baselines + CI diff artifacts |
test-playwright | Drive the app like a user; fix functional pain |
audit-responsive | Find linearized layout; this locks the fix |
audit-ui-states | Design empty/error states; this locks them |
audit-uiux-design-system | Token/component compliance (not screenshot CI) |
test-qa | Exploratory CRUD QA |
Observe: dashboard spec screenshots the whole page; a relative "Updated 3s ago" label sits in the header. Interpret: every CI run diffs that label. Classify: must mask (or freeze time) — not a product regression. Fix:
maskthe timestamp; prove ≥3 consecutive local runs with zero diff.
Prefer the repo's existing Playwright. Do not add a second visual vendor if Playwright screenshots already work.
audit-responsive breakpoints)audit-ui-states: empty, error, loadedExclude volatile content (timestamps, live feeds, mid-animation). Mask or freeze it — otherwise every run is a false positive.
prefers-reduced-motion; disable transitionsProve stability: ≥3 consecutive local runs with zero diff before calling the harness done.
--update-snapshots)Save ad-hoc captures under .playwright-mcp/, not the repo root.
test-playwright.playwright-mcp/ for ad-hoc; baselines in the harness diraudit-responsive / audit-ui-states — what to locktest-playwright / test-qa — functional, not pixelprotocol-browser-anti-stall — headed sessionsaudit-cicd — CI minutes / artifact retention