Aman-Mittal opened a new pull request, #240:
URL: https://github.com/apache/fineract-backoffice-ui/pull/240
Closes #239.
Three independent commits. The first is a two-line CI fix that is worth
reading first — happy to split it into its own PR if that helps it land sooner.
---
### 1. `fix(ci)`: unit tests have never run in CI
`npm run test` was a bare `ng test`. The workspace declares two projects and
no default, so the CLI resolved it to the `fineract-mfe` placeholder — one spec
file, two tests, exit code `0`. Every run ended in `TOTAL: 2 SUCCESS` and the
application's **775 specs never executed**.
This has been the case since `04252c2` converted the workspace to a
microfrontend layout. The `test` job in `ci.yml` has been passing on it, and
its coverage step uploads `coverage/fineract-backoffice-ui/`, which the run it
depends on never produced.
All 775 specs pass once actually invoked, so nothing was hiding a failure —
but nothing was covering anything either. `DOCS/CI_CHECKS.md` had rationalised
the `TOTAL: 2` as the MFE project "printing separately"; corrected here.
### 2. `fix(ci)`: the API drift check covered ~76% of what it claimed
The manifest is built by matching `this.<field>.<operation>(` in one piece,
so it only saw single-line calls. Prettier breaks long calls across lines:
```ts
this.tellerService
.getTellersTellerIdCashiers(this.tellerId)
```
Every wrapped call was invisible to it. Allowing whitespace around the dot
takes the recorded surface from **413 to 544 operations**.
The failure mode was quiet in the worst way: regenerating the manifest
dropped operations that had since been reformatted, so the check kept passing
while covering less each time. It was dropping two live calls in this very
change — `getEntityTypeEntityIdCalendars` and
`deleteCodesCodeIdCodevaluesCodeValueId`.
### 3. `feat(tellers)`: the feature itself
Adds a shared allocate/settle form, addressed as `.../transactions/allocate`
and `.../transactions/settle` so each command keeps its own URL, plus a
transactions view showing total allocated, total settled and net cash above the
entries that produced them.
Also fixes two defects found while building it, both described in #239:
- **The cashiers list was always empty.** It read the top-level `/cashiers`
collection, which answers `204 No Content` for every combination of `officeId`
and `tellerId`. An empty list is indistinguishable from a teller with no
cashiers, which is why it survived. Now reads `GET
/tellers/{tellerId}/cashiers`.
- **The summary silently reported zeros.** Without a `currencyCode` the
endpoint answers `200` with every total at `0` and no transactions. The view
now reads the transactions template first and asks for a currency the cashier
can actually hold.
---
### Testing
`e2e/teller-cash-management.spec.ts` runs against a real Fineract and drives
everything through the UI, including the financial-activity mappings for Cash
at Main Vault (101) and Cash at Teller (102) — without those, allocation fails
`404` naming an activity id and never mentioning tellers, so that configuration
is genuinely part of the feature working at all. The setup is idempotent, since
the suite runs repeatedly against the same database.
It creates a staff member per run: Fineract refuses a cashier whose dates
overlap one the employee already holds **on any teller**, so reusing an
employee makes the test pass once and fail on every run after.
The settlement is asserted on its response rather than on the rendered
total. `summaryandtransactions` reports a settlement inconsistently on this
platform build for an otherwise identical sequence, and the same endpoint
answers for a cashier paired with the wrong teller id in the path, so it
appears to key on the cashier alone. Asserting the total would make the suite
fail intermittently for behaviour the UI does not control. This is flagged in
#239 as worth reporting upstream.
Verified:
- e2e green **twice** against the same live database, confirming
repeatability
- unit suite `TOTAL: 788 SUCCESS` (775 existing + 13 new), now actually
running
- `lint`, `build`, `i18n:check`, `check:icons`, `format:check`,
`api:surface` all clean
### Notes for review
- New components use the ADR-0003 adapter boundary (`| appTranslate`,
adapter fakes in specs).
- `src/app/testing/i18n-testing.ts` is added to the narrow
`no-restricted-imports` exemption list, on the same composition-root argument
as `app.config.ts`: specs rendering shared components that still use `|
translate` need the library configured, and doing it in one helper is what
stops `TranslateModule.forRoot()` from being re-imported by every spec.
- Dates go through `formatDateToFineract`, which pads the day to match the
declared `dd MMMM yyyy`; an unpadded day fails to parse and returns `500`
rather than a validation message.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]