148 — Generate PDF and transition protocol to SIGNED_AND_CONFIRMED¶
Description¶
For every variant, the "Vygenerovat a podepsat" action on the detail page
generates the protocol PDF (a file download is triggered) and transitions the
protocol from IN_PROCESS to SIGNED_AND_CONFIRMED. Parametrized — one test
per variant.
Preconditions¶
- Clean database (
TestControl.cleanDb()) - User logged in with ADMIN and ACCOUNTING roles
- User signature set up (
Orders.setupUserSignature) — required for generation - Customer, contract and received order created via API
- Depends on the OneDrive / SharePoint mock used by the generate-and-sign server action
Steps¶
- Create a protocol of the variant through the create modal — Expected: on the detail page
- Click "Vygenerovat a podepsat" (
protocol-generate-pdf) — Expected: a*.pdfdownload is triggered - Return to
/protocols— Expected: the grid row state chip isprotocol-state-chip-SIGNED_AND_CONFIRMED
Related¶
- Spec:
tests/e2e/tests/protocols.spec.ts - PDF download uses a blob + anchor (
makeDownloadBlob), asserted viapage.waitForEvent('download')