153 — Only-one-per-order variant cannot be created twice for same order¶
Description¶
Some variants are limited to one per received order (WORK_HANDOVER, CONSTRUCTION_SITE, RETAINAGE_REQUEST_SHORT_TERM, RETAINAGE_REQUEST_LONG_TERM). Once a WORK_HANDOVER exists for an order, re-opening the create flow for that order offers no "Nový" button for WORK_HANDOVER.
Preconditions¶
- Clean database (
TestControl.cleanDb()) - User logged in with ADMIN and ACCOUNTING roles
- Customer, contract and received order created via API
Steps¶
- Create a WORK_HANDOVER protocol for the order — Expected: created
- Re-open the create flow, select the same order — Expected: "Vyberte typ protokolu" dialog opens
- Inspect the WORK_HANDOVER row — Expected: no
new-protocol-WORK_HANDOVER"Nový" button is offered
Related¶
- Spec:
tests/e2e/tests/protocols.spec.ts ONLY_ONE_PROTOCOLSinCreateProtocolModal