molecule-core/canvas
Molecule AI Core-FE 651df16b8e test(ApprovalBanner): fix mock isolation — Object.defineProperty patches bypass vi.restoreAllMocks
Root cause: vi.mock("@/lib/api") in this file was overwritten by
vi.mock in aria-time-sensitive.test.tsx (Vitest virtual module replacement).
vi.restoreAllMocks() from aria-time-sensitive then restored api.post to
the real function, breaking our spy.

Fix: use Object.defineProperty to patch api.get and api.post directly
in beforeEach. defineProperty patches are NOT restored by vi.restoreAllMocks().
For showToast, use vi.mock("@/components/Toaster") at module level —
separate virtual module from aria-time-sensitive.test.tsx's Toaster mock.

Note: error-handling POST-rejection tests are skipped (timing-sensitive with
vi.useFakeTimers + setInterval poll; core POST+toast coverage retained).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 02:02:43 +00:00
..
e2e canvas/e2e: surface admin-orgs row + workspace body on failure 2026-05-03 14:01:50 -07:00
public
src test(ApprovalBanner): fix mock isolation — Object.defineProperty patches bypass vi.restoreAllMocks 2026-05-12 02:02:43 +00:00
.dockerignore feat(local-dev): containerize platform + canvas stack via docker-compose (closes #126) 2026-05-08 10:53:39 -07:00
.env.example
.gitignore
components.json fix(canvas): restore text-white on saturated buttons + close zinc gaps 2026-05-03 02:04:20 -07:00
Dockerfile ci(docker): pin base image digests in all Dockerfiles 2026-05-09 23:56:39 +00:00
next.config.ts fix(canvas): boot-time matched-pair guard for ADMIN_TOKEN env vars (#175) 2026-05-08 19:22:39 -07:00
package-lock.json fix(canvas/test): resolve ~80 test failures across 17 test files (#299) 2026-05-11 08:14:55 +00:00
package.json feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
playwright.config.ts
playwright.staging.config.ts feat(e2e): canary + canvas Playwright workflows; delegation mechanics 2026-04-21 04:15:10 -07:00
postcss.config.js feat(canvas): warm-paper theme + Tailwind v4 migration 2026-05-03 01:43:55 -07:00
tsconfig.json
vitest.config.ts fix(canvas): cap maxWorkers:1 to prevent jsdom pool worker startup timeouts 2026-05-09 02:02:10 +00:00