Aman-Mittal opened a new pull request, #661:
URL: https://github.com/apache/fineract-backoffice-ui/pull/661
Running the full `backend` project end to end surfaced two failures out of
117. Both are test defects rather than application defects, and both have the
same cause: the spec looked for a record it had just seeded on whichever page
the table rendered first, and seeded records accumulate on an instance that is
not torn down between runs.
```
117 tests: 115 passed, 2 failed (13.8m)
1) rbac-office-scoped-user.spec.ts:161 — is not offered an edit it would be
refused for
2) report-parameter-backend.spec.ts:67 — changing Office changes the Client
Listing row set
```
**Neither fails on a fresh stack, which is why CI is green.** They fail for
anyone who runs the backend project twice against the same container — which is
the normal local workflow.
## Offices
`.data-table` here is `localLogic` with the shared ten-row default. The
instance had 32 offices, so a branch created moments earlier was not on the
first page:
```
Locator: locator('.data-table').getByText('E2EScoped Branch qw6uro').first()
Expected: visible
Error: element(s) not found
```
Now filters by the seeded office name, which is unique per run, so
pagination stops mattering. Filtering rather than widening the page size,
because the row count only grows and any fixed page size is the same bug
deferred.
## Client Listing report
This one cannot be fixed by paging at all. The spec already bumped the
paginator to 100, but `pageSizeOptions` is `[5, 10, 25, 100]` — 100 is the
ceiling — and Head Office had passed 118 clients, so the seeded client sat
beyond any page the test could turn to.
The row set is now read from the report response instead of the rendered
table. That is also closer to what the spec is about: its own docblock says the
original bug was "the UI silently omitted a declared parameter and Fineract
returned the wrong scope", so which rows the Office parameter *brought back* is
the thing under test. The table is still asserted to render, which is the half
the user sees, and the comparisons between the two office runs are unchanged.
## Verification
Both specs, against the same reused instance that produced the failures
above:
```
npx playwright test --project=backend rbac-office-scoped-user.spec.ts
report-parameter-backend.spec.ts
11 passed (1.2m)
```
Also run in the same session, for context on where these came from:
```
npx playwright test --project=mocked 409 passed, 1 skipped (9.6m)
npx playwright test --project=backend 115 passed, 2 failed (13.8m) ← the
two fixed here
npm run typecheck:e2e clean
scripts/check-license.sh clean
prettier --check clean
```
No application code is touched.
--
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]