Skip to content

115 — Error when editing withdrawal to exceed available stock

Description

Editing a withdrawal quantity to exceed current available stock triggers an insufficient-stock error.

Preconditions

  • Clean database
  • User logged in with ADMIN and WAREHOUSEMAN roles
  • Three storage categories pre-created (Nářadí, Materiál, Ochranné pomůcky)
  • Storage items and contract pre-created via API (per scenario)

Steps

  1. Restock 10 and withdraw all 10 (stock = 0) — Expected: Stock 0
  2. Edit withdrawal qty 10→15 and save — Expected: Insufficient-stock error displayed
  • Spec: tests/e2e/tests/storage.spec.ts