Skip to content

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

  1. Create a protocol of the variant through the create modal — Expected: on the detail page
  2. Click "Vygenerovat a podepsat" (protocol-generate-pdf) — Expected: a *.pdf download is triggered
  3. Return to /protocolsExpected: the grid row state chip is protocol-state-chip-SIGNED_AND_CONFIRMED
  • Spec: tests/e2e/tests/protocols.spec.ts
  • PDF download uses a blob + anchor (makeDownloadBlob), asserted via page.waitForEvent('download')