test(canvas): context-menu delete spec skips delete-confirm path when workspace list is empty #2798

Closed
opened 2026-06-14 00:59:33 +00:00 by agent-researcher · 0 comments
Member

MECHANISM: canvas/e2e/context-menu-delete.spec.ts has a suite-wide beforeEach that GETs /workspaces and calls test.skip(...) when the list is empty (context-menu-delete.spec.ts:19-25). That incorrectly suppresses the primary delete-confirm test even though that test creates its own leaf workspace before opening the canvas (context-menu-delete.spec.ts:28-37). On a clean/ephermeral canvas environment with zero pre-existing workspaces, the regression path from PR #1133 can false-green instead of proving the portal ConfirmDialog survives context-menu unmount and deletes the created workspace.

EVIDENCE: current main 1f9b2f4f0beb89c8592c5111cddf6400aa8822fa still has the skip gate at canvas/e2e/context-menu-delete.spec.ts:23-24 (No workspaces on canvas) immediately before the self-seeding test body at :32-37. The second cancel test has a separate legitimate dependency on an existing workspace (:91-98), but the delete-confirm test does not. Open issue scan found #2794 and #2796 for other skip/false-green cases; no existing context-menu-delete issue was open.

RECOMMENDED FIX SHAPE: Canvas/frontend owner should split the setup by test. Remove the suite-level empty-workspace skip for the delete-confirm case and let that test create/register its own workspace unconditionally, failing if create/register/canvas render fails. Keep or replace the cancel-path dependency with explicit fixture seeding so both tests are fail-closed. Add a regression assertion that the delete-confirm test runs in an initially empty /workspaces response rather than skipping.

MECHANISM: `canvas/e2e/context-menu-delete.spec.ts` has a suite-wide `beforeEach` that GETs `/workspaces` and calls `test.skip(...)` when the list is empty (`context-menu-delete.spec.ts:19-25`). That incorrectly suppresses the primary delete-confirm test even though that test creates its own leaf workspace before opening the canvas (`context-menu-delete.spec.ts:28-37`). On a clean/ephermeral canvas environment with zero pre-existing workspaces, the regression path from PR #1133 can false-green instead of proving the portal ConfirmDialog survives context-menu unmount and deletes the created workspace. EVIDENCE: current main `1f9b2f4f0beb89c8592c5111cddf6400aa8822fa` still has the skip gate at `canvas/e2e/context-menu-delete.spec.ts:23-24` (`No workspaces on canvas`) immediately before the self-seeding test body at `:32-37`. The second cancel test has a separate legitimate dependency on an existing workspace (`:91-98`), but the delete-confirm test does not. Open issue scan found #2794 and #2796 for other skip/false-green cases; no existing context-menu-delete issue was open. RECOMMENDED FIX SHAPE: Canvas/frontend owner should split the setup by test. Remove the suite-level empty-workspace skip for the delete-confirm case and let that test create/register its own workspace unconditionally, failing if create/register/canvas render fails. Keep or replace the cancel-path dependency with explicit fixture seeding so both tests are fail-closed. Add a regression assertion that the delete-confirm test runs in an initially empty `/workspaces` response rather than skipping.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2798