Add comprehensive contract - #604
Conversation
|
Thanks for the work on this @Dev-journals — the scope of the changes looks substantial, and I appreciate the effort that went into the contract work. Before we can merge, though, there are a couple of CI issues that need to be addressed. First, Second, the Playwright job is failing with 32 tests. The clearest failure is Could you please investigate both the lint failures and the Playwright failures, then push an update and rerun CI? In particular, I’d like to see the underlying type issue and the reason Thanks again for the contribution! |
…iles - Fix contractErrorParser.ts: ScVal is not a top-level export from @stellar/stellar-sdk; use xdr.ScVal instead (resolves TS2614) - Fix App.tsx: add missing AdminPanel import (resolves TS2304) - Run prettier on 8 files with formatting issues: App.tsx, AppNav.tsx, ContractErrorPanel.tsx, useContractError.ts, BulkPaymentTracker.module.css, EmployeePortal.tsx, bulkPaymentApi.ts, stellar.ts - Remove now-redundant eslint-disable directive in contractErrorParser.ts
PR Summary
The rbac.ts middleware creates its own new Pool() at module-load time — completely bypassing Jest's pg mock. When isolateOrganization ran inside route handlers, it tried to connect to the real (unavailable) PostgreSQL, causing the 500 errors.
Fix: Mock Both Middlewares
Added jest.mock('../middlewares/auth.js', ...) and jest.mock('../middlewares/rbac.js', ...) before any module imports, so the routes use test-safe pass-through implementations that never touch a database.
Architecture of the Test Suite
Closes #559