From 01ed9edc7ea9a92543c7bb223244a28f7a3d32de Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Sun, 14 Jun 2026 01:29:26 +0000 Subject: [PATCH] test(e2e): relax over-corrected empty-canvas guard in delete spec (#2805) PR #2801 removed the false-green skip in context-menu-delete.spec.ts, but it added a global expect(beforeWorkspaces).toHaveLength(0) guard that over-constrained the test: it failed on seeded or shared E2E platforms that already had workspaces, even though the test only interacts with its own seeded E2E Delete Test node. - Remove the global empty-canvas precondition from the delete-confirm test. - Keep the seeded-node-by-name targeting and the fail-closed contract (no test.skip() paths). - The cancel test is unaffected (it already seeds its own workspace). Closes #2805 Co-Authored-By: Claude --- canvas/e2e/context-menu-delete.spec.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/canvas/e2e/context-menu-delete.spec.ts b/canvas/e2e/context-menu-delete.spec.ts index a0ca8177a..19c2311ef 100644 --- a/canvas/e2e/context-menu-delete.spec.ts +++ b/canvas/e2e/context-menu-delete.spec.ts @@ -40,11 +40,8 @@ test.describe("Context Menu → Delete Confirm", () => { page, request, }) => { - // Regression: this test must run from an empty canvas so the old - // suite-level `test.skip()` cannot mask a failure to create/register. - const before = await request.get(`${API}/workspaces`); - const beforeWorkspaces = (await before.json()) as Array<{ id: string; name: string }>; - expect(beforeWorkspaces).toHaveLength(0); + // Fail-closed: this test seeds its own workspace and targets it by name. + // It does NOT assume an empty canvas, and it never calls test.skip(). // 1. Create a workspace to delete (leaf node — no children, no cascade) const { id: wsId } = await seedWorkspace(request, "E2E Delete Test"); -- 2.52.0