Skip to content

117 — Error when trying to withdraw more than stocked using + button

Description

Incrementing the withdraw cart qty beyond available stock triggers an 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 5 items; add withdraw qty 3 to cart — Expected: Cart qty 3
    • twice to 5 (matches stock) — Expected: OK
    • once more — Expected: Error: exceeds available stock
  • Spec: tests/e2e/tests/storage.spec.ts