test(e2e): org-template import spec false-greens when template registry is empty #2809

Closed
opened 2026-06-14 01:32:47 +00:00 by agent-researcher · 1 comment
Member

MECHANISM: canvas/e2e/org-template-import.spec.ts treats an empty /org/templates response as a reason to skip both org-template UI tests. That means a broken or unpopulated template registry silently removes the only browser-level coverage for the palette import surface. The app already renders an explicit empty state in canvas/src/components/TemplatePalette.tsx, so the E2E can pass without proving either the configured-template path or the expected setup contract.

EVIDENCE: On current main c07322a630f6, canvas/e2e/org-template-import.spec.ts:11 and :39 call test.skip(orgs.length === 0, "No org templates configured"). The same empty registry is considered a setup failure in tests/e2e/test_dev_mode.sh:158 (GET /org/templates returned empty list). Skip audit found this as the only non-staging runtime skip; the remaining test.skip(!STAGING) uses are environment-gated staging suites.

RECOMMENDED FIX SHAPE: Canvas/frontend owner should make this fail-closed. Either seed/install a deterministic org-template fixture before the Playwright spec and assert at least one template renders/imports, or change the E2E precondition to fail with a setup error when /org/templates is empty. Keep the component-level empty-state tests for the empty case, but do not let the E2E import coverage skip on missing fixtures.

MECHANISM: `canvas/e2e/org-template-import.spec.ts` treats an empty `/org/templates` response as a reason to skip both org-template UI tests. That means a broken or unpopulated template registry silently removes the only browser-level coverage for the palette import surface. The app already renders an explicit empty state in `canvas/src/components/TemplatePalette.tsx`, so the E2E can pass without proving either the configured-template path or the expected setup contract. EVIDENCE: On current main `c07322a630f6`, `canvas/e2e/org-template-import.spec.ts:11` and `:39` call `test.skip(orgs.length === 0, "No org templates configured")`. The same empty registry is considered a setup failure in `tests/e2e/test_dev_mode.sh:158` (`GET /org/templates returned empty list`). Skip audit found this as the only non-staging runtime skip; the remaining `test.skip(!STAGING)` uses are environment-gated staging suites. RECOMMENDED FIX SHAPE: Canvas/frontend owner should make this fail-closed. Either seed/install a deterministic org-template fixture before the Playwright spec and assert at least one template renders/imports, or change the E2E precondition to fail with a setup error when `/org/templates` is empty. Keep the component-level empty-state tests for the empty case, but do not let the E2E import coverage skip on missing fixtures.
Author
Member

MECHANISM: Re-audited current main and #2809 is still live. canvas/e2e/org-template-import.spec.ts skips both browser-level org-template import tests when /org/templates returns an empty list, so a missing/uncloned template registry removes the E2E coverage instead of failing the setup. Component tests cover the empty-state UI; this Playwright spec is supposed to prove the configured-template path.

EVIDENCE: current main d985301685e6 still has test.skip(orgs.length === 0, "No org templates configured") at canvas/e2e/org-template-import.spec.ts:11 and :39. The fix attempt #2811 matched the recommended fail-closed shape, but it is closed unmerged, so main still carries the false-green. Contrast: tests/e2e/test_dev_mode.sh:158 already treats empty /org/templates as a setup failure, not a pass.

RECOMMENDED FIX SHAPE: Canvas/frontend owner should reopen/recreate the #2811-style change: move the /org/templates fetch into a shared setup/precondition, assert orgs.length > 0, and fail loudly with setup guidance when empty. Keep empty-state coverage in component tests, but do not allow the E2E import surface to skip on missing fixtures.

MECHANISM: Re-audited current main and #2809 is still live. `canvas/e2e/org-template-import.spec.ts` skips both browser-level org-template import tests when `/org/templates` returns an empty list, so a missing/uncloned template registry removes the E2E coverage instead of failing the setup. Component tests cover the empty-state UI; this Playwright spec is supposed to prove the configured-template path. EVIDENCE: current main `d985301685e6` still has `test.skip(orgs.length === 0, "No org templates configured")` at `canvas/e2e/org-template-import.spec.ts:11` and `:39`. The fix attempt #2811 matched the recommended fail-closed shape, but it is closed unmerged, so main still carries the false-green. Contrast: `tests/e2e/test_dev_mode.sh:158` already treats empty `/org/templates` as a setup failure, not a pass. RECOMMENDED FIX SHAPE: Canvas/frontend owner should reopen/recreate the #2811-style change: move the `/org/templates` fetch into a shared setup/precondition, assert `orgs.length > 0`, and fail loudly with setup guidance when empty. Keep empty-state coverage in component tests, but do not allow the E2E import surface to skip on missing fixtures.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2809