Skip to content

test(e2e): fix tests that fail when the whole suite runs on one server - #10

Draft
ostenbom wants to merge 1 commit into
mainfrom
e2e/single-server-test-fixes
Draft

ostenbom wants to merge 1 commit into
mainfrom
e2e/single-server-test-fixes

Conversation

@ostenbom

@ostenbom ostenbom commented Oct 27, 2026 •

Copy link
Copy Markdown

What does this PR do?

Fixes three Node E2E tests that fail when the whole suite runs against one server. CI splits the suite over 8 shards, each with its own server and database, so CI on main doesn't hit these failures. A full local run (pnpm test:e2e, with or without EMDASH_E2E_BUILD=production) does, and so does Endform, which runs every test against one shared server.

Split out of #6 and #7 so those PRs carry only what a built fixture needs. #8 and #9 include this commit, because Endform needs it.

Test Why it fails on one server Fix
sandbox-plugin-admin-surfaces.spec.ts: hook events The test listed the test plugin's events with limit: 100. A full run records more, so the events it looked for were missing. The test plugin's events-list route accepts ids for a direct lookup, and the test asks for its own two events.
sandbox-plugin-boundaries.spec.ts: user list Required exactly one user. Once the passkey setup test has run, there are two. Checks that the list contains the dev admin.
media-library.spec.ts: drag into a folder In a crowded root folder the dragged row sat at the viewport's bottom edge, where dnd-kit auto-scrolls and the measured drop target moves. pointerDrag scrolls the source to the centre and re-measures the target during the drag.

The drag test still fails about 1 run in 3 in a very crowded root folder. That is the "1 failed" in the local production timings on #7.

Related PRs

PR Server under test Where it runs Core change
#6 astro build --devOutput 8 GitHub shards (layout unchanged) One line: the build-time registry check accepts localhost in a dev-output build
#7 astro build 8 GitHub shards (layout unchanged) New build-time dangerouslyEnableTestHooks option
#8 (stacked on #6) astro build --devOutput Endform, one job None beyond #6
#9 (stacked on #7) astro build Endform, one job None beyond #7
#10 (this PR) any Wherever the whole suite shares one server: a full local run, or Endform None; three test fixes, included in #8 and #9
#4 astro build with a runtime env switch Endform Prototype that the others replace

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

AI assistance disclosure

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

Screenshots / test output

Not applicable.

🤖 Generated with Claude Code

CI splits the Node suite over 8 shards, each with its own server, so
these only fail in a full run against a single server:

- The sandbox hook-event test listed the test plugin's events with
  limit 100; a full run records more. The plugin's events-list route
  now accepts `ids` for a direct lookup.
- The sandbox user-list check required exactly one user, but the
  passkey setup test adds a second.
- In a crowded root folder the dragged media row sat at the viewport's
  bottom edge, where dnd-kit auto-scrolls and the drop target moves.
  pointerDrag now scrolls the source to the centre and re-measures the
  target during the drag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant