Skip to content

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

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

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?

Three Node E2E tests fail when the whole suite runs against one server, as it does in a full local pnpm test:e2e run. CI doesn't catch them because each of its 8 shards gets its own server and database.

  • sandbox-plugin-admin-surfaces: the hook-events check read the first 100 events, and a full run records more. The test plugin's events-list route now takes ids, and the test looks up its own two events.
  • sandbox-plugin-boundaries: it expected exactly one user, but after the passkey setup test there are two. It now checks that the dev admin is in the list.
  • media-library drag into a folder: in a crowded root folder the dragged row sat at the viewport's edge, where dnd-kit auto-scrolls. The drag helper now scrolls the row to the centre and re-measures the drop target. It still fails now and then when the folder is very crowded.

This is independent of the two E2E speed-up PRs (#6 and #7), but you need it for a full local run of either.

I used claude to help me create this PR, but I have run the suite and reviewed the code myself.

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): the full Node suite on one server, with these fixes, locally against both the dev server and a production build
  • 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): not applicable
  • I have added and reviewed the user-facing changeset (if this PR changes a published package): not applicable, @emdash-cms/plugin-marketplace-test is private
  • New features link to their merged design PR: not applicable
  • I have included screenshots below if this PR changes the UI: not applicable

AI assistance disclosure

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

Screenshots / test output

Not applicable.

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