Test cases: Admin B2B orders
Document control
Section titled “Document control”| Version | Date (UTC) | Summary |
|---|---|---|
| 1.0.0 | 2026-05-13 | Split sheet aligned with Orders (Admin) guide |
- Guide: Orders (Admin) — routes
/dashboard/orders,/dashboard/orders/:id. - API:
admin/orders(list, detail, status, receipt HTML) — exact paths per OpenAPI. - PII / disputes: correlate with POS payments & webhooks.
Scenario catalogue
Section titled “Scenario catalogue”List — tabs, search, filters, pagination
Section titled “List — tabs, search, filters, pagination”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-AOB-001 | Happy | All tab loads first page; row count matches API total | E2E* |
| TC-AOB-002 | Happy | Paid / Pending / Cancelled / Returns tabs send correct tab key to API (AdminOrdersTab) | Unit + E2E* |
| TC-AOB-003 | Happy | Debounced search (e.g. 400ms) refetches; page resets to 1 | E2E* |
| TC-AOB-004 | Happy | Filter popover: vendor + store + date range + sort; store filter drives overview stats | E2E* |
| TC-AOB-005 | Unhappy | Invalid date range → validation or empty result with clear UX | E2E* |
| TC-AOB-006 | Unhappy | Zoned admin: list excludes orders for stores outside zone | Unit + E2E* |
| TC-AOB-007 | Happy | Pagination fixed page size (10); next/prev preserves filters | E2E* |
| TC-AOB-008 | Unhappy | Page beyond last page → empty table + stable pagination state | E2E* |
Overview stats
Section titled “Overview stats”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-AOB-010 | Happy | Stat cards (total, pending, completed, refunded) match API when store filter set | Unit + E2E* |
| TC-AOB-011 | Happy | Stats fall back to vendor scope when store not selected | Unit |
| TC-AOB-012 | Unhappy | Stats request fails → cards show error / skeleton fallback | E2E* |
Detail — read, edit, receipt
Section titled “Detail — read, edit, receipt”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-AOB-020 | Happy | Open detail loads lines, customer, store snapshot, totals, payment state | E2E* |
| TC-AOB-021 | Unhappy | Order id not found → 404 / not-found UI | Unit + E2E* |
| TC-AOB-022 | Happy | Edit order modal: allowed fields persist; status from normalized set | E2E* |
| TC-AOB-023 | Unhappy | Status transition not allowed by rules → API error surfaced in modal | Unit + E2E* |
| TC-AOB-024 | Happy | Receipt dialog: default HTML preview loads GET …/receipt-html | E2E* |
| TC-AOB-025 | Happy | Receipt checkbox tip_signature=1 loads merchant-copy variant (tip + signature + footer) | E2E* |
| TC-AOB-026 | Unhappy | Receipt HTML request fails → dialog error, no blank silent failure | E2E* |
Security & audit
Section titled “Security & audit”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-AOB-030 | Unhappy | Module or zone denial on list/detail → 403 + no PII leak in message body | Unit |
| TC-AOB-031 | Happy | Export / print actions respect policy (if present) | Manual |
Coverage checklist (this sheet)
Section titled “Coverage checklist (this sheet)”- Tab keys in UI ↔
admin-orders.api.ts↔ backend DTO documented in one row - Receipt query params (
tip_signature) covered in visual QA once per release - Refund / finance overlap with Vendor finance noted for cross-team UAT
Parent index: System test cases (index) · Cross-cutting: Admin backend