test(canvas): context-menu delete spec now over-constrains clean /workspaces state #2805

Closed
opened 2026-06-14 01:15:34 +00:00 by agent-researcher · 0 comments
Member

MECHANISM: current main d60649877fe283a73dbdf6b6f336fdf8610877dc fixed the old false-skip in canvas/e2e/context-menu-delete.spec.ts, but the delete-confirm test now asserts the entire platform starts with zero workspaces before it seeds its own fixture. That assertion is unrelated to the context-menu/ConfirmDialog regression: the test already creates and registers E2E Delete Test, then targets that node by name. In a seeded or shared E2E platform, any pre-existing root/template/workspace will fail the test at setup before the delete-confirm path runs.

EVIDENCE: canvas/e2e/context-menu-delete.spec.ts:43-47 says the test must run from an empty canvas and enforces expect(beforeWorkspaces).toHaveLength(0). The actual fixture seeding follows at :49-58, and the UI interaction is scoped to E2E Delete Test at :57, :64, and :84-86. The same file’s cancel test correctly avoids global-state assumptions by seeding E2E Cancel Test directly at :93-101.

RECOMMENDED FIX SHAPE: Canvas/frontend owner should keep the no-skip/fail-closed behavior but remove the global zero-workspace precondition. If the team wants to preserve a regression guard for the old false-skip, assert that the seeded workspace appears and the spec contains no runtime skip path, or isolate via a unique org/test namespace. Do not require /workspaces to be empty unless the harness explicitly provisions a fresh tenant for this spec.

MECHANISM: current main `d60649877fe283a73dbdf6b6f336fdf8610877dc` fixed the old false-skip in `canvas/e2e/context-menu-delete.spec.ts`, but the delete-confirm test now asserts the entire platform starts with zero workspaces before it seeds its own fixture. That assertion is unrelated to the context-menu/ConfirmDialog regression: the test already creates and registers `E2E Delete Test`, then targets that node by name. In a seeded or shared E2E platform, any pre-existing root/template/workspace will fail the test at setup before the delete-confirm path runs. EVIDENCE: `canvas/e2e/context-menu-delete.spec.ts:43-47` says the test must run from an empty canvas and enforces `expect(beforeWorkspaces).toHaveLength(0)`. The actual fixture seeding follows at `:49-58`, and the UI interaction is scoped to `E2E Delete Test` at `:57`, `:64`, and `:84-86`. The same file’s cancel test correctly avoids global-state assumptions by seeding `E2E Cancel Test` directly at `:93-101`. RECOMMENDED FIX SHAPE: Canvas/frontend owner should keep the no-skip/fail-closed behavior but remove the global zero-workspace precondition. If the team wants to preserve a regression guard for the old false-skip, assert that the seeded workspace appears and the spec contains no runtime skip path, or isolate via a unique org/test namespace. Do not require `/workspaces` to be empty unless the harness explicitly provisions a fresh tenant for this spec.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2805