Test cases: Vendor inventory
Document control
Section titled “Document control”| Version | Date (UTC) | Summary |
|---|---|---|
| 1.0.0 | 2026-05-13 | Initial split from vendor backend |
| 1.1.0 | 2026-05-13 | Internal transfers (vendor/internal-transfers) + warehouse detail tab |
- Guide: Inventory (Vendor)
- API:
vendor/inventory,vendor/stocks,vendor/warehouses,vendor/lots,vendor/adjustments,vendor/internal-transfers(Backend modules).
Scenario catalogue
Section titled “Scenario catalogue”Warehouses
Section titled “Warehouses”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VINV-001 | Happy | List warehouses for selected store | Unit + E2E* |
| TC-VINV-002 | Unhappy | Missing store_id on scoped route → 400 | Unit |
| TC-VINV-003 | Happy | Create / update warehouse with valid address fields | E2E* |
| TC-VINV-004 | Unhappy | Duplicate code / invalid zone rejected | Unit |
Stocks & lots
Section titled “Stocks & lots”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VINV-010 | Happy | Stock list pagination + search + sort URL sync | E2E* |
| TC-VINV-011 | Happy | Lot detail shows traceability fields expected by UI | E2E* |
| TC-VINV-012 | Unhappy | Lot not in store → 403 / 404 | Unit |
| TC-VINV-013 | Unhappy | Concurrent adjustment race → optimistic UI or refetch | E2E* |
Adjustments
Section titled “Adjustments”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VINV-020 | Happy | Create adjustment draft → submit → approved stock movement | Unit + E2E* |
| TC-VINV-021 | Unhappy | Negative stock after adjustment blocked by server | Unit |
| TC-VINV-022 | Unhappy | Wrong warehouse for SKU → rejection | Unit |
| TC-VINV-023 | Happy | Adjustment list filters by status and date | E2E* |
Internal transfers (vendor/internal-transfers)
Section titled “Internal transfers (vendor/internal-transfers)”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VINV-040 | Happy | GET vendor/internal-transfers/list with store_id + pagination returns rows for warehouse pair | Unit✓ (apps/backend/src/modules/vendor/vendor-internal-transfers.controller.spec.ts) |
| TC-VINV-041 | Happy | POST vendor/internal-transfers — valid source/dest warehouses + lines moves stock (inventory service) | Unit✓ (apps/backend/src/modules/vendor/vendor-inventory.service.spec.ts) |
| TC-VINV-042 | Unhappy | Source warehouse = destination → 400 / validation error | Unit |
| TC-VINV-043 | Unhappy | Line quantity above available → insufficient stock surfaced to UI toast | Unit + E2E* |
| TC-VINV-044 | Happy | Warehouse detail Internal transfers tab lists history; empty state when none | E2E* |
| TC-VINV-045 | Happy | New transfer route (/dashboard/inventory/internal-transfers/new) — pick source first, then products, submit success | E2E* |
| TC-VINV-046 | Unhappy | User without inventory module → 403 on list + create | Unit |
Soft-delete / visibility (if product exposes)
Section titled “Soft-delete / visibility (if product exposes)”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VINV-030 | Happy | Archived master rows hidden from default filters when API supports | Unit |
| TC-VINV-031 | Unhappy | Restore / unarchive requires permission | Unit |
Coverage checklist (this sheet)
Section titled “Coverage checklist (this sheet)”- Mirror admin inventory sheets where behavior is symmetric (Admin warehouses if applicable)
- High-risk paths: lot expiry, valuation mode (if any) have explicit unhappy rows
- Internal transfer DTO changes mirrored in TC-VINV-040+ and
CreateVendorInternalTransferDtounit tests
Parent index: System test cases (index) · Cross-cutting: Vendor backend