Trường Số QA/08 Inventory (P2 smoke)
Trường Số · QA test suite · Phase 1 · 10/09/2026

08 · Inventory (P2 smoke)

Test cases for PRD 08. Every case names the fixture data it needs (see the dashboard fixtures table), numbered steps, and one observable expected result. Trace points to the user story or rule in the PRD.

Key facts, origin and limits
Cases
14
P0 / P1
4 / 8
Regression pack
4
PRD
08 Inventory (P2 smoke)
Phase
P2

Drafted by an AI assistant in a single session on 10/09/2026 as part of the Trường Số QA suite, under the request quoted verbatim on the dashboard. A proposal for team review, not a sign-off.

Sources

  • The Trường Số PRD set (Draft v1, 10/09/2026): user stories, screen tables, business rules and permission matrices, plus the Cloud theme reference.

Limits

  • Phase 1 (authoring) only. Cases are executed in Phase 2 against the local build; results are recorded in testcases.json and runs/run-1/, and every result field is still not_run.
  • Cases inherit any open question or inconsistency in the PRDs they trace to.

1Summary

P0
4
P1
8
P2
2
P3
0
Typefunctionalui-uxedgenegativeregressionflowa11yperfsecurityi18n
Count9112000010

2Test cases

IDTitleTypePriorityPhasePreconditionsStepsExpected resultPRD traceData neededRun 1
TS-INV-001Create a catalog item; duplicate SKU rejectedfunctionalP0P2As U-ACC on /inventory tab Danh mục.
  1. Create SKU FF2, name "Family and Friends 2", unit cuốn, category Sách, sale 180,000, cost 120,000, reorder 5, chargeable on, course Movers 2.
  2. Create another with SKU FF2.
First saved active; second shows inline "Mã hàng đã tồn tại"; SKU forced uppercase A–Z0–9-; delete not offered (deactivate only).INV-01Fixtures belowNot run
TS-INV-002Stock-in document increases on-hand and becomes read-onlyfunctionalP0P2Item FF2.
  1. Post a stock-in at branch A: FF2 qty 40, unit cost 120,000, reference "NCC-001".
Document code NK-YYYYMM-####; on-hand 40 at A (0 at B); document immutable after posting; movement type Nhập.INV-02Fixtures belowNot run
TS-INV-003Issue to a student creates a finance linefunctionalP0P2S1 active; on-hand 40.
  1. From S1 profile issue FF2 qty 1 chargeable.
Toast "Đã phát 1 cuốn Family and Friends 2 cho Nguyễn An" with link to the finance line; on-hand 39; Materials tab lists the item with payment status; tuition line type material 180,000 exists.INV-03Fixtures belowNot run
TS-INV-004Insufficient stock blocks the issuenegativeP0P2On-hand 1.
  1. Issue qty 2.
Form blocks with "Không đủ tồn kho (còn 1)"; API 409 INSUFFICIENT_STOCK; no movement.INV-03Fixtures belowNot run
TS-INV-005Withdrawn student cannot receive itemsnegativeP1P2S5.
  1. Issue to S5.
Blocked with a status message; event inventory_issue_blocked reason student_status.08 §5Fixtures belowNot run
TS-INV-006Class hand-out with shortfall offers partial issuefunctionalP1P2C1 12 students; on-hand 10.
  1. Issue FF2 to class C1.
Dialog shows shortfall 2; option to issue to the first 10 by display name or cancel; one movement per student in one transaction; toast lists the shortfall.INV-04Fixtures belowNot run
TS-INV-007Transfer between branches is atomic; same-branch refusedfunctionalP1P2As U-OWNER.
  1. Transfer 5 FF2 from A to B.
  2. Attempt A to A.
Paired transfer_out/transfer_in with the same document_id; A 34, B 5; same-branch rejected client- and server-side.INV-05Fixtures belowNot run
TS-INV-008Count adjustment above threshold needs approvalfunctionalP1P2On-hand 34; count 20.
  1. Post a count sheet with reason kiểm kê.
Adjust −14 pending (> 10 units); U-BM-A approves; on-hand 20.INV-06Fixtures belowNot run
TS-INV-009Low-stock tab and daily notificationfunctionalP1P2Reorder 5; on-hand 4 after issues.
  1. Open tab Sắp hết; trigger the 08:00 job.
FF2 listed with chip Sắp hết; in-app notification to users with inventory.manage.INV-07Fixtures belowNot run
TS-INV-010Return in new and damaged conditionfunctionalP1P2An issue movement.
  1. Return as new; return another as used.
New: on-hand +1; used: damaged +1 (Hỏng column shows); chargeable line flagged for credit, not deleted.INV-08Fixtures belowNot run
TS-INV-011Concurrent issue of the last copyedgeP1P2On-hand 1; two admins.
  1. Both issue simultaneously.
One succeeds; the other gets 409.08 §10Fixtures belowNot run
TS-INV-012Cost price visible only to owner and accountantsecurityP1P2U-ACAD-A.
  1. Open the stock table and item form.
Giá vốn and Giá trị tồn hidden; API omits cost fields.08 §8 inventory.view_costFixtures belowNot run
TS-INV-013Stock table formatting and empty stateui-uxP2P2/inventory.
  1. Read the table; open on EMPTY.
SKU monospace; Tồn right-aligned red when ≤ reorder; Hỏng hidden when 0; VND with thousands separator; empty text "Chưa có hàng hoá. Tạo danh mục trước, sau đó nhập kho." with button Tạo mặt hàng; pagination 50.08 §4Fixtures belowNot run
TS-INV-014Movements export CSVfunctionalP2P2As U-ACC.
  1. Export movements for A this month.
CSV downloads with the movement columns; teacher gets 403.08 §7 exportFixtures belowNot run

Trường Số (truongso.net) · FLYER internal