Test cases: Shared packages & desktop
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 cross-cutting + desktop catalogue |
| 1.1.0 | 2026-05-13 | Dashboard number formatters (dashboard-number-format.ts) TC block |
- Shared:
packages/shared— form primitives, pagination helpers, dashboard number format helpers (formatDashboardCount,formatDashboardUsd, …) — colocate Unit specs with changed modules. - Desktop:
apps/vendor-desktop— WebSocket bridge, PAX LAN vs CodePay WS (ECR transport split).
Scenario catalogue
Section titled “Scenario catalogue”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-SHR-001 | Happy | Shared FormField renders label + error from RHF + Zod | Unit |
| TC-SHR-002 | Unhappy | Invalid zod message key falls back safely | Unit |
Dashboard number format (packages/shared/src/lib/dashboard-number-format.ts)
Section titled “Dashboard number format (packages/shared/src/lib/dashboard-number-format.ts)”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-SHR-010 | Happy | formatDashboardCount matches stable en-US integer grouping | Unit✓ (dashboard-number-format.spec.ts) |
| TC-SHR-011 | Happy | formatDashboardWholeNumber never emits fraction digits | Unit✓ |
| TC-SHR-012 | Happy | formatDashboardUsd emits USD currency style | Unit✓ |
| TC-SHR-013 | Happy | formatDashboardUsdInteger rounds to whole dollars | Unit✓ |
| TC-SHR-014 | Happy | formatDashboardDecimalLoose allows 0–2 fraction digits | Unit✓ |
| TC-SHR-015 | Happy | formatDashboardPercentValue formats 0–100 with up to two decimals | Unit✓ |
| TC-SHR-016 | Unhappy | Non-finite input (NaN, Infinity) coerces to 0 safely (no throw) | Unit✓ |
Vendor desktop & bridge
Section titled “Vendor desktop & bridge”| ID | Class | Scenario | Automation |
|---|---|---|---|
| TC-DES-001 | Happy | Desktop connects bridge with valid terminalId + token | Manual |
| TC-DES-002 | Unhappy | Stale token → server closes socket; UI shows reconnect | Manual |
| TC-DES-003 | Happy | pax_lan relay reaches pinpad on LAN | Manual |
| TC-DES-004 | Happy | codepay_ws relay reaches terminal WebSocket URL | Manual |
| TC-DES-005 | Unhappy | ECR relay timeout → operator sees actionable error | Manual |
Coverage checklist (this sheet)
Section titled “Coverage checklist (this sheet)”- Each new shared export used by both apps has a TC-SHR- row
- Bridge message types from
pos-bridgedocs mirrored with happy/unhappy - Security review cases (token scope, TLS) listed for release checklist
Parent index: System test cases (index)