Aman-Mittal opened a new pull request, #498:
URL: https://github.com/apache/fineract-backoffice-ui/pull/498
## What and why
Five UI defects found in a hands-on testing pass against `main`, plus two
pieces of test coverage that pass had shown were missing.
It is three separable workstreams in one PR. They touch disjoint files and
are kept as three commits, so reviewing commit-by-commit is the easiest path —
happy to split into separate PRs if that is preferred.
Closes #488. Closes #494. Closes #497.
### 1. UI fixes — `86ee94c5`
| Fix | Issue |
|---|---|
| Paginator applied the "of many" sentinel to totals it already knew exactly
| #488 |
| The required Office select rendered as a bare chevron with no placeholder
| #494 |
| Guide's accessible name was "Help Tour" while its visible label reads
"Guide" | #497 |
| `index.html` carried no meta description | #497 |
| Notifications rendered an empty `<tbody>` instead of an empty state | #497
|
The paginator change is the only one with any blast radius. `rangeLabel`'s
`length % pageSize === 1` sentinel is the right hedge for a genuinely paged
Fineract response, so it is left alone by default; a new `exactTotal` input
(default `false`) suppresses it, and `DataTableComponent` passes `localLogic()`
— so screens that already hold the entire result set client-side get a real
count while every server-paged screen behaves exactly as before.
### 2. Batch API operations e2e — `4e24df72`
Mirrors Fineract's own `BatchApi.feature` scenario "As a user I would like
to run a sample Batch API scenario" (TestRailId C63), whose glue code is
`BatchApiStepDef.runSampleBatchApiCall()`. That scenario POSTs a four-step
reference-chained batch straight through `BatchApiApi`; this drives the same
batch through `/admin/batch-operations` instead.
What it actually protects: `$.clientId` and `$.loanId` are Fineract's own
batch reference syntax, resolved server-side, and a step's `body` has to remain
a JSON **string** for those tokens to survive as literal text. The test proves
the UI's `JSON.parse` → `BatchAPIService.postBatches` passthrough neither drops
nor reshapes what that substitution depends on.
Adds `seedLoanCharge` to the seed helpers, and test ids to
`BatchOperationsComponent`, which had no stable hooks on its textarea, submit
button, error text or results card.
### 3. Sidebar coverage and a mobile-login fix — `dcb03083`
`SidebarService`/`SidebarComponent` are two different things by viewport — a
collapsible column when wide, a modal drawer when narrow — and only the wide
half was covered. Adds the narrow half: inert while closed, Escape and the
close button shut it, a completed navigation closes it so the destination is
not left behind an overlay, and leaving mobile clears the drawer flag so
returning does not restore an overlay nobody asked for.
This also surfaced a real defect in `e2e/utils/fineract-login.ts`: it waited
on `getByRole('navigation', { name: 'Main Navigation' })`, which only ever
resolves on a wide viewport, because the component's role becomes `dialog` once
it is a modal drawer. Any mobile-viewport caller of the helper would hang until
timeout. It now waits on `#app-navigation`, which is stable across both modes.
## Verification
- `npm run lint` — clean
- Unit tests for the touched files — 41 passed across 4 files
- `npm run i18n:check` — 1609 referenced keys resolved, no missing keys
- `npx prettier --check` on all 15 changed files — clean
- Commits are signed
The new Batch API spec is registered under `BACKEND_SPECS` and needs a real
Fineract instance; it was not run locally, so CI's real-backend shard is the
first full execution. The four-step batch body is transcribed from
`BatchApiStepDef` rather than re-derived.
## Checklist
- [x] I did not hand-edit generated files under `src/app/api/`.
- [x] No new browser globals or imperative third-party APIs; the
adapter-boundary item is not applicable.
- [x] User-facing strings use translation keys (`CLIENTS.SELECT_OFFICE`
added, `COMMON.NO_DATA` reused).
- [x] Added unit coverage for the paginator change and for the sidebar's
narrow-viewport behaviour.
- [x] Added e2e coverage for Batch API operations.
- [x] Commits are signed.
--
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]