Skip to content

test: add initial visual regression baselines - #2165

Merged
ascorbic merged 2 commits into
mainfrom
chore/bootstrap-visual-baselines
Jul 21, 2026
Merged

ascorbic merged 2 commits into
mainfrom
chore/bootstrap-visual-baselines

Conversation

@ascorbic

@ascorbic ascorbic commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

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 Regression artifact generated for PR #2136 at 46b437eafba767285dc3ef247647f7a4e1c2f1c9, keeping baseline bootstrap out of that unrelated contributor PR.

Type of change

  • Tests

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes (not run; PNG-only test data)
  • pnpm lint passes
  • pnpm test passes (the PR visual-regression check verifies these Linux baselines)
  • pnpm format has been run (not applicable to PNG files)
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (not applicable)
  • I have added a changeset (not applicable; no published package changes)
  • New features link to an approved Discussion (not applicable; test data only)

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: GPT-5.6 Sol

Screenshots / test output

All 14 files have SHA-256 hashes identical to the trusted workflow artifact. The PR Visual Regression check 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.

Copilot AI review requested due to automatic review settings July 21, 2026 06:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cd08cda

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-13

    This 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.
    

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground cd08cda Jul 21 2026, 07:00 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache cd08cda Jul 21 2026, 06:58 AM

@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/admin@2165

@emdash-cms/auth

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth@2165

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth-atproto@2165

@emdash-cms/blocks

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/blocks@2165

@emdash-cms/cloudflare

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/cloudflare@2165

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/contentful-to-portable-text@2165

emdash

npm i https://pkg.pr.new/emdash-cms/emdash@2165

create-emdash

npm i https://pkg.pr.new/emdash-cms/emdash/create-emdash@2165

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/gutenberg-to-portable-text@2165

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-cli@2165

@emdash-cms/plugin-types

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-types@2165

@emdash-cms/registry-client

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-client@2165

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-lexicons@2165

@emdash-cms/registry-verification

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-verification@2165

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/sandbox-workerd@2165

@emdash-cms/x402

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/x402@2165

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-ai-moderation@2165

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-atproto@2165

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-audit-log@2165

@emdash-cms/plugin-color

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-color@2165

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-embeds@2165

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-field-kit@2165

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-forms@2165

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-webhook-notifier@2165

commit: cd08cda

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-do cd08cda Jul 21 2026, 06:59 AM

@github-actions github-actions Bot added the review/awaiting-author Reviewed; waiting on the author to respond label Jul 21, 2026
@github-actions github-actions Bot added review/needs-rereview Author pushed changes since the last review and removed review/awaiting-author Reviewed; waiting on the author to respond labels Jul 21, 2026
@ascorbic
ascorbic enabled auto-merge (squash) July 21, 2026 07:07
@ascorbic
ascorbic merged commit 73dadc2 into main Jul 21, 2026
47 checks passed
@ascorbic
ascorbic deleted the chore/bootstrap-visual-baselines branch July 21, 2026 07:13
swissky pushed a commit to swissky/emdash that referenced this pull request Jul 21, 2026
* test: add initial visual regression baselines

* docs: update visual test gating comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/needs-rereview Author pushed changes since the last review size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants