Aman-Mittal opened a new pull request, #193:
URL: https://github.com/apache/fineract-consumer-facing/pull/193

   Closes #192.
   
   **Stacked on #191.** The loan-withdrawal journey found bug #190, so this 
branch includes that fix commit (`fix(frontend): send the withdraw command the 
BFF accepts`). Once #191 merges, I'll rebase this PR and that commit will drop 
out of its diff.
   
   ## What it adds
   
   **The suite.** A second Playwright suite, 
`frontend/playwright.full-stack.config.ts` and 
`frontend/playwright/full-stack/`, that drives the built app against the 
`docker-compose.e2e.yml` stack with **nothing mocked**: the real BFF, Fineract, 
PostgreSQL, Valkey and Mailpit. The existing stubbed specs stay as they are.
   
   **How each test sets up its consumer** (as the product does):
   1. **Staff side, through Fineract's REST API** (`support/fineract.ts`): an 
active client with an SSN identifier, two USD savings accounts (one funded with 
5,000) and a disbursed 10,000 loan. The seeder adds an `SSN` code value if the 
tenant lacks one, because the registration form offers SSN and Aadhaar.
   2. **Self-registration in the app,** confirmed with the OTP emailed to the 
consumer.
   3. **Multi-factor sign-in:** password, then the emailed second factor.
   
   Every OTP is read from Mailpit (`support/mailpit.ts`). The BFF keeps one 
pending OTP per user, so the inbox is cleared before each action that sends a 
code.
   
   ## Journeys (17)
   
   | Spec | What it proves |
   |---|---|
   | `auth` | Register, then sign in with the second factor; sign out and be 
redirected from a protected page. Wrong password and wrong code are refused. 
Reset a forgotten password by emailed code and sign in with it. |
   | `accounts` | The summary lists the Fineract accounts. Savings detail shows 
the balance, the deposit and the transaction page. Loan detail shows the 
disbursal. |
   | `beneficiaries` | Add, rename and delete a beneficiary, each change 
confirmed by OTP. Adding your own account is refused. |
   | `transfers` | Transfer between your own accounts. Pay a beneficiary within 
its limit; a payment above the limit is refused. **Balances are checked in 
Fineract.** |
   | `loans` | Preview a schedule, submit an application and withdraw it, 
**with the status checked in Fineract**. Repay from savings with an OTP, and 
see the **outstanding amount fall in Fineract**. |
   | `profile-settings` | The profile shows the registered client. Change the 
password with an OTP and sign in with the new one. No connected apps for a new 
consumer. |
   | `audit` | The audit trail records the sign-in. Another customer's account 
is refused (ABAC). Menu navigation and the language switch work. |
   
   Tests are independent (each seeds its own client) and take about a minute in 
total.
   
   ## CI and docs
   - **Scripts:** `npm run e2e:full-stack` (and `:ui`). `e2e:stack:run` now 
runs both suites.
   - **CI:** `build-tests-frontend.yml` runs the journeys in the existing 
Playwright job, against the same stack and after the mocked specs. The step is 
`!cancelled()`, so both suites report. Traces and videos are uploaded on 
failure. The workflow reuses `upload-artifact` at the exact SHA already used in 
the file.
   - **Docs:** `docs/frontend/development/build-and-test.adoc` has a 
"Full-stack journeys" section. It covers the set-up, a table of journeys, the 
two Ionic details new tests need (`action()` for `ion-button[routerLink]`, 
which renders as a link, and `select()` for overlay selects), and the 
environment overrides.
   
   ## Verification (local, against `docker-compose.e2e.yml`)
   - **The suite:** 17/17 pass, then 34/34 with `--repeat-each=2`, with no 
flakes.
   - **Type-check:** the support and test files pass `tsc --strict`. The only 
errors are `Buffer` and `process`, because the repo does not install 
`@types/node`; the existing Playwright config uses `process` the same way.
   - **Before the fix:** the loan withdrawal journey failed with HTTP 400 
(#190). It passes with the fix commit.
   
   Tests, workflow and docs only; no production code beyond the stacked #191 
fix.


-- 
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