test(e2e): add liquidity operations flow coverage (#78)#101
test(e2e): add liquidity operations flow coverage (#78)#101Ayomisco wants to merge 1 commit intoTrustUp-app:mainfrom
Conversation
- GET /liquidity/overview: public pool metrics (no auth required) - GET /liquidity/my-summary: investment summary with auth + 401 guard - POST /liquidity/deposit: XDR preview, min/max validation, 401 guard - POST /liquidity/withdraw: XDR preview, zero-shares validation, 401 guard - 10 scenarios covering HTTP responses and service delegation - Mocks LiquidityService + JwtAuthGuard; no Redis/blockchain deps
Josue19-08
left a comment
There was a problem hiding this comment.
Hi @Ayomisco, thank you for your contribution to the project! 🙌
The HTTP contract tests for the four liquidity endpoints are well-structured, but issue #78 requires a more complete end-to-end flow. Here's what's missing:
-
Transaction submission tests — The issue requires "Test transaction submission for deposit (POST /transactions/submit)" and the same for withdrawal. These are not covered.
-
Complete end-to-end flow — The issue asks for testing the full path:
deposit → submit transaction → confirm → check summary → withdraw.
Currently each endpoint is called in isolation with a fully mocked service. -
Database state verification — The issue requires "Verify database state changes (deposit history, share balances)." With
LiquidityServicefully mocked, no real state is checked.
Please extend the suite to cover these scenarios. Feel free to push the update and I'll take another look. Thanks again! 🚀
[E2E Tests] Liquidity Operations Flow Coverage (#78)
Summary
Implements E2E integration test coverage for all four liquidity endpoints, validating HTTP contracts, auth guards, and input validation without Redis or blockchain dependencies.
Test Coverage (10 scenarios)
GET /liquidity/overview
GET /liquidity/my-summary
POST /liquidity/deposit
POST /liquidity/withdraw
Results
close #68
close #78