Aman-Mittal opened a new issue, #190:
URL: https://github.com/apache/fineract-consumer-facing/issues/190

   **What happens.** On `/loans/apply`, after "Submit application", pressing 
"Withdraw draft" fails. The BFF answers 400 with 
`error.msg.consumer.loans.command.application.invalid`, and the draft stays.
   
   **Why.** The BFF's `POST /api/v1/loans/{loanId}` only accepts 
`command=withdrawnByApplicant` (`LoansCommandService.WITHDRAW_COMMAND`, which 
is Fineract's name for the transition). Any other value is rejected in 
`LoansCommandController.withdraw` before Fineract is called. The Angular app 
sends `command=withdraw`:
   - `frontend/src/app/core/adapters/api/bff-loan.api.ts`: `WITHDRAW_COMMAND = 
'withdraw'`
   - before #169, the same literal was in `LoansStore`
   
   Fineract itself accepts the withdrawal when it is sent 
`withdrawnByApplicant` directly.
   
   **Why no test caught it:**
   - `loans.store.spec.ts` asserts `command=withdraw`, so it pins the wrong 
value.
   - The Cucumber suite has no withdraw scenario.
   - The existing Playwright loan tests stub the BFF.
   
   The full-stack Playwright journey that submits and withdraws an application 
against the real BFF found it.
   
   **Steps to reproduce:**
   1. Sign in.
   2. Go to Loans → Apply for a loan.
   3. Choose a product, fill in the terms, and submit.
   4. Press "Withdraw draft".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to