Skip to content

test(e2e): measure the 320 px settings sheet after it slides in - #4320

Open
danielmlr wants to merge 2 commits into
mainfrom
daniel/content-actions-sheet-settle
Open

danielmlr wants to merge 2 commits into
mainfrom
daniel/content-actions-sheet-settle

Conversation

@danielmlr

Copy link
Copy Markdown
Contributor

What does this PR do?

Stops the 320 px publishing test in content-actions.spec.ts from failing at random in CI. Below 1024 px the editor's Settings panel is a sheet that slides in over 250 ms, and the test measured it while it was still moving, so its right edge could read anywhere between 320 and 640 px. Two recent CI failures, one of them on main, read 331 to 619 px.

The test now waits for the sheet's animations to finish before it measures, and the assertions stay the same. #3285 changed this check after #3249 was reported, but not when it runs.

Closes #3249

Type of change

  • Bug fix
  • Feature (requires an accepted feature plan or RFC)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Your connection to this change

  • I use EmDash and ran into the problem this PR addresses
  • I maintain a tool, dependency, or service that EmDash uses, and this change concerns that integration
  • A Maintainer approved this specific change before I opened the PR

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main. (n/a: test-only change)
  • I have added and reviewed the user-facing changeset (if this PR changes a published package) (n/a: test-only change, no published package changes)
  • New features link to their merged design PR: https://github.com/emdash-cms/emdash/pull/... (n/a: not a feature)
  • I have included screenshots below if this PR changes the UI (n/a: no UI change)

AI assistance disclosure

  • This PR includes AI-generated code or text — model/tool: Claude Opus 5.5

Screenshots / test output

Test output, Chromium on macOS. When the test shrinks the window, the sheet starts sliding shut, and locally the Settings click lands just as that starts, so the sheet is back almost at once and main passes. A pause before the click stands in for a slower CI runner:

  • With a 300 ms pause, so the sheet has closed before the click: main fails 3 of 3 times with a right edge of 623 px, and this branch passes 5 of 5. With a 120 ms pause, so the click catches the sheet halfway, the branch passes 3 of 3.
  • Without the pause, the branch passes 5 of 5.

Below 1024 px the editor's Settings panel is a Kumo sheet that slides in
with a 250 ms transform transition. Playwright treats it as visible
while it is still moving, and boundingBox() includes the transform, so
the 320 px test could read a right edge anywhere between 320 and 640
pixels. CI read 330-619 px.

Wait for the sheet's animations to finish before measuring.
@changeset-bot

changeset-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b437d81

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

@github-actions github-actions Bot added the query-count changed PR diff modifies query-count snapshot files label Oct 21, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://daniel-content-actions-sheet-settle.try.emdashcms.com, https://daniel-content-actions-sheet-settle-emdash-playground.emdash-cms.workers.dev (commit b437d81)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2cfd0542.try.emdashcms.com, https://2cfd0542-emdash-playground.emdash-cms.workers.dev b437d81 2026-10-21T14:17:51.673Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0285c232.try.emdashcms.com, https://0285c232-emdash-playground.emdash-cms.workers.dev 869d16f 2026-10-21T02:26:23.601Z Visit the dashboard ↗

@github-actions github-actions Bot added size/XS review/needs-review No maintainer or bot review yet cla: signed labels Oct 21, 2026

@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 and narrowly scoped. Below lg the Settings panel is a sheet that slides in, and the test measured it mid-animation. The PR now waits for the sheet's animations to finish before reading boundingBox(), and it leaves the assertions unchanged. This matches the getAnimations() → finished pattern already used elsewhere in the e2e suite. Neither reviewer found a blocking issue. One reviewer left a single optional hardening suggestion, and the other had no findings. The change is test-only, so no changeset is needed. One point is unverified: Kumo's Sidebar source could not be read, so it is not confirmed statically that the transition sits on the element carrying the Settings label. The author's reported before/after runs suggest it does.


Reviewed by anthropic/claude-opus-5-5 and openai/gpt-6.1-sol.

Comment thread e2e/tests/content-actions.spec.ts
@emdashbot emdashbot Bot added review/needs-review No maintainer or bot review yet and removed review/needs-review No maintainer or bot review yet labels Oct 21, 2026
@github-actions github-actions Bot removed the query-count changed PR diff modifies query-count snapshot files label Oct 21, 2026
@cloudflare-workers-and-pages

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
docs b437d81 Oct 21 2026, 02:17 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: signed review/needs-review No maintainer or bot review yet size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky E2E: content-actions.spec.ts "keeps publishing choices usable in a 320-pixel viewport" (Cloudflare target)

1 participant