Test cases: Vendor orders & checkout
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Document control
Section titled “Document control”| Version | Date (UTC) | Summary |
|---|---|---|
| 1.0.0 | 2026-05-13 | Initial split — high surface area for revenue |
- Guides: Orders (Vendor), POS (Vendor)
- Apps:
/dashboard/orders,/dashboard/orders/create,/dashboard/orders/shifts/*, integration withusePosPlaceOrder(see Vendor testing index). - API:
vendor/orders, shift endpoints, order create payloads (OpenAPI).
Scenario catalogue
Section titled “Scenario catalogue”Orders list & detail
Section titled “Orders list & detail”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VOC-001 | Happy | Order list loads with store + status filters; URL sync | E2E* |
| TC-VOC-002 | Happy | Open order detail: lines, customer, payments, timeline | E2E* |
| TC-VOC-003 | Unhappy | Order in other store (tampered id) → 403 / not found | Unit |
| TC-VOC-004 | Unhappy | Employee without order module → 403 | Unit |
| TC-VOC-005 | Happy | Cancel order when business rules allow; list updates | E2E* |
| TC-VOC-006 | Unhappy | Cancel blocked (state / payment) → error toast + no partial mutation | Unit + E2E* |
Shifts
Section titled “Shifts”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VOC-010 | Happy | Shift list for store; open shift detail with aggregates | E2E* |
| TC-VOC-011 | Happy | Close shift with balanced cash; confirmation summary | E2E* |
| TC-VOC-012 | Unhappy | Close shift with unresolved orders → blocking or warning per policy | Unit + E2E* |
| TC-VOC-013 | Unhappy | Overlapping shift open → rejection | Unit |
Create order (dashboard)
Section titled “Create order (dashboard)”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VOC-020 | Happy | Add line items, customer, discounts; totals match server quote | E2E* |
| TC-VOC-021 | Unhappy | Out-of-stock SKU at quantity → block or warn per UX | E2E* |
| TC-VOC-022 | Happy | Submit create order succeeds; redirects or clears cart | E2E* |
| TC-VOC-023 | Unhappy | Network fail on submit → retryable error; no duplicate on retry if idempotent key | E2E* |
Checkout parity (shared hook)
Section titled “Checkout parity (shared hook)”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-VOC-030 | Happy | usePosPlaceOrder contract: dashboard POS, POS workspace, create order share mutation handlers | Unit + E2E✓ (apps/vendor-web/e2e/pos-place-order-surfaces.spec.ts) |
| TC-VOC-031 | Unhappy | Place order validation error maps to stock highlight + translated message | Unit |
| TC-VOC-032 | Happy | Receipt finalize runs after success (runVendorPosOrderReceiptFinalize path) | Unit |
Coverage checklist (this sheet)
Section titled “Coverage checklist (this sheet)”- Shift open/close rules match Work shifts doc
- Every new checkout entrypoint added to TC-VOC-030 matrix
- BNPL / receivable creation side-effects listed if create order opens debt
Parent index: System test cases (index) · UI depth: Vendor POS workspace · Cross-cutting: Vendor backend