test: add initial visual regression baselines - #2165
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
There was a problem hiding this comment.
The approach is sound: bootstrapping the initial Linux/Chromium visual-regression baselines in a dedicated PR keeps the unrelated contributor PR (#2136) clean and gives the Visual Regression workflow real baselines to diff against for the first time. I verified the 14 added PNGs match the ${pageCase.name}-${locale.name}-chromium-linux.png names that Playwright's toHaveScreenshot() will generate from e2e/tests/visual-regression.spec.ts, and the .gitignore intentionally allows committed *-chromium-linux.png baselines.
The only real issue is a stale comment in the spec. It currently gates the suite "until baselines are committed (a fresh checkout has none, which would fail CI)". Once this PR lands, baselines will exist on main, so that rationale becomes false and will mislead future contributors. AGENTS.md says comments must be evergreen, not stale narrative, so the comment should be updated to reflect the actual reason (the suite is slow and platform-sensitive, so CI runs it explicitly).
Findings
-
[needs fixing]
e2e/tests/visual-regression.spec.ts:12-13This comment's rationale becomes false as soon as this PR lands. It currently says the suite is gated "until baselines are committed (a fresh checkout has none, which would fail CI)" — but this PR is exactly what commits those baselines. AGENTS.md requires comments to be evergreen and not stale narrative, so the gating reason should describe the real, ongoing concern (slow, platform-sensitive snapshots that CI runs explicitly).
* Gated behind EMDASH_VISUAL=1 so visual-regression snapshots stay out of the * default e2e suite; they are slow and Linux-environment-sensitive, so CI runs * them explicitly via this env var.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | cd08cda | Jul 21 2026, 07:00 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | cd08cda | Jul 21 2026, 06:58 AM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | cd08cda | Jul 21 2026, 06:59 AM |
* test: add initial visual regression baselines * docs: update visual test gating comment
What does this PR do?
Adds the initial 14 Linux/Chromium baselines for the admin visual-regression suite. The PNGs are copied byte-for-byte from the trusted
Visual Regressionartifact generated for PR #2136 at46b437eafba767285dc3ef247647f7a4e1c2f1c9, keeping baseline bootstrap out of that unrelated contributor PR.Type of change
Checklist
pnpm typecheckpasses (not run; PNG-only test data)pnpm lintpassespnpm testpasses (the PR visual-regression check verifies these Linux baselines)pnpm formathas been run (not applicable to PNG files)AI-generated code disclosure
Screenshots / test output
All 14 files have SHA-256 hashes identical to the trusted workflow artifact. The PR
Visual Regressioncheck will run against them in the same Linux/Chromium environment.Try this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
chore/bootstrap-visual-baselines. Updated automatically when the playground redeploys.