Repository navigation
test(e2e): fix tests that fail when the whole suite runs on one server - #4517
Conversation
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 <[email protected]>
|
All contributors have signed the CLA ✍️ ✅ |
|
There was a problem hiding this comment.
The approach is sound: the tests now assert on the data they create instead of assuming a fresh database, which breaks when CI shards share a server. The drag helper also stays on the real drag-and-drop path. Both reviewers approved with no findings. They found no production code changes and no changeset needed, since the plugin package is private. The events-list ids branch uses getMany, which the sandbox wrappers support. Requests without valid ids keep the old query path. The users check keeps meaningful coverage while allowing the extra passkey user. Both reviews were static and ran no checks. Neither confirmed that the drag adjustment removes the flakiness the PR says remains in a very crowded root folder.
Reviewed by anthropic/claude-opus-5-5 and openai/gpt-6.1-sol.
|
I have read the CLA Document and I hereby sign the CLA |
|
Thanks for contributing to EmDash! 🎉 Join the EmDash Discord, then run |
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:e2erun. 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'sevents-listroute now takesids, 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-librarydrag 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 (#4518 and #4519), 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
Your connection to this change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (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 buildpnpm formathas been run@emdash-cms/plugin-marketplace-testis privateAI assistance disclosure
Screenshots / test output
Not applicable.