Skip to content

151 — Create protocol requires a received order

Description

A protocol must be bound to a received order. In the create flow, confirming the "Vyberte objednávku" dialog without selecting an order shows a "Povinné" (required) validation error and does not advance to the protocol-type step.

Preconditions

  • Clean database (TestControl.cleanDb())
  • User logged in with ADMIN and ACCOUNTING roles
  • No setup data needed

Steps

  1. Navigate to /protocols and click "Přidat protokol" — Expected: "Vyberte objednávku" dialog opens
  2. Click "Vybrat" without selecting an order — Expected: "Povinné" error is shown and the "Vyberte typ protokolu" dialog does not open
  • Spec: tests/e2e/tests/protocols.spec.ts
  • Server-side: protocolCommonCreateSchema requires receivedOrder; DB enforces the FK