fix(GRO-1212/GRO-1213): fix DB mock imports in portal and waitlist test files #402
Reference in New Issue
Block a user
Delete Branch "fix/GRO-1212-portal-test-mock-imports"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix DB mock setup in
apps/api/src/__tests__/portal.test.tsto resolve JSON parse errors and Internal Server Error (500) in test output.Changes
impersonationAuditLogstable mock (Proxy) to@groombook/dbvi.mockdb.insert()method to the mock for portalAudit middlewareTest plan
pnpm test -- src/__tests__/portal.test.tspasses all testsDATABASE_URL is not setorInternal Server ErrorerrorsUpdated UAT_PLAYBOOK.md §3.2 — portal notes/cancel/confirm test cases updated to reflect mock improvements.
QA review passed. All CI checks pass (Lint, Typecheck, Test, E2E, Build). Change is test-only — adds missing
impersonationAuditLogsProxy mock anddb.insert()stub following existing patterns. No user-facing behaviour changed. Approved for merge todev.Deployed to groombook-dev
Images:
pr-402URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO review: approved. Test-only change, follows existing mock patterns, all CI green. Merging to dev.