161 — Retainage request protocols (KZ/DZ) linked on the retainage invoice row¶
Description¶
Verifies the protocols ↔ retainage module link ("provázání s modulem retainage"):
a short-term (KZ) and a long-term (DZ) RETAINAGE_REQUEST protocol created for a
received order are surfaced on that order's invoice row in the /retainage grid.
mapRetainageInvoice fills retainageRequestProtocol.{SHORT,LONG} and the grid
renders each protocol code as a link in the corresponding column.
Preconditions¶
- Clean database (
TestControl.cleanDb()) - User logged in with ADMIN and ACCOUNTING roles; user signature set up
- Customer + contract (branch
2025031) + received order (externalNumberOBJ-NOT-EXPIRED, matching mock invoiceFV2025020006) with retainage % - A signed work-handover protocol on the order (so the invoice appears)
Steps¶
- Create a RETAINAGE_REQUEST_SHORT_TERM and a RETAINAGE_REQUEST_LONG_TERM protocol on the order (API) — Expected: created (IN_PROCESS)
- Open the /retainage page — Expected: invoice row
FV2025020006is visible - Assert the row's
retainageRequestProtocol.SHORTcell — Expected: links aZKZ…code - Assert the row's
retainageRequestProtocol.LONGcell — Expected: links aZDZ…code - Click the SHORT (KZ) link — Expected: navigates to
/protocols/{id}/retainage-request-short-term, detail heading = thatZKZ…code - Return to /retainage and click the LONG (DZ) link — Expected: navigates to
/protocols/{id}/retainage-request-long-term, detail heading = thatZDZ…code
Related¶
- Spec:
tests/e2e/tests/retainage.spec.ts RetainageService.getAllRetainageInvoices→mapRetainageInvoice(invoice, workHandover, retainageRequestProtocols)- Protocol-level coverage of the variants:
tests/e2e/tests/protocols.spec.ts(scenario 156)