Repository navigation
test(e2e): cover the collection sheet filter against a real Fineract - #681
Conversation
The unit tests drive the component through mocked HTTP. This drives the screen
in a browser against the platform, which is where two of the three defects
actually lived.
- Staff is scoped to the office. The select stays disabled until an office is
chosen, and GET /staff?officeId=N is what fills it.
- The chosen staff member reaches the wire. This reads the outgoing request
body rather than the form, because the form was never the broken part:
staffId was collected and then dropped by buildBody(), so the control
looked and behaved correctly while doing nothing.
- An empty sheet reports itself. Nothing is due on a seeded instance with no
meeting calendars, so Generate exercises the branch that used to render the
word "null" with a live Save button under it. Save is asserted absent and
Back present.
Mutation tested. Dropping staffId from buildBody() again fails on exactly the
missing field:
Object {
"officeId": 1,
- "staffId": 15,
}
which is the assertion that matters here, since the defect was invisible from
the UI: the dropdown populated, an officer could be picked, the form submitted
and a result came back.
Uses the shared selectOption() helper rather than hand-rolling the overlay
interaction. These selects are interface="popover", which commits on click and
has no OK button, so a hand-rolled click-radio-then-OK sequence waits for a
button that never exists.
The populated-sheet path is deliberately absent: it needs a group with a
meeting calendar and repayments falling on the meeting date, and the shape
Fineract returns is not the one the generated client declares. See apache#670.
E2E — mocked backend🎭 E2E Tests✅ All green — 409 passed · 0 failed · 1 skipped, across 38 spec files in 9m 1s. By spec file
All 410 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 37030845256 from |
E2E — real Fineract🎭 E2E Tests✅ All green — 126 passed · 0 failed · 0 skipped, across 39 spec files in 8m 41s. By spec file
All 126 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 37030845256 from |
What and why
The e2e half of #669, which landed without it — #669 merged at its second commit while this spec was still being written, so the fix is on
mainwith unit coverage but no browser coverage.Adds
e2e/collection-sheet.spec.tsto thebackendproject. It drives the screen against a live Fineract and asserts the three things #669 repaired:GET /staff?officeId=Nand fills the select;isIonSelectDisabled()reads the host property rather than an attribute, because the disabled state lives in shadow DOM.selectOption()is the existing helper — these selects areinterface="popover", which commits on click and has no OK button, so a hand-rolled interaction waits for a button that never appears.Verification
Re-run on current
mainrather than on the branch it was written against, since the fix it covers is already merged.Previously mutation-tested on #669: dropping
staffIdfrombuildBody()fails on exactly the missing field —Note
This adds
collection-sheet.spec.tstoBACKEND_SPECS. #676 added two entries to the same list and has since merged, so the conflict flagged on #669 is resolved here by keeping all three.Checklist
src/app/api/.