Skip to content

Test cases: Shared packages & desktop

VersionDate (UTC)Summary
1.0.02026-05-13Initial cross-cutting + desktop catalogue
1.1.02026-05-13Dashboard 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).

IDClassScenarioAutomation
TC-SHR-001HappyShared FormField renders label + error from RHF + ZodUnit
TC-SHR-002UnhappyInvalid zod message key falls back safelyUnit

Dashboard number format (packages/shared/src/lib/dashboard-number-format.ts)

Section titled “Dashboard number format (packages/shared/src/lib/dashboard-number-format.ts)”
IDClassScenarioAutomation
TC-SHR-010HappyformatDashboardCount matches stable en-US integer groupingUnit✓ (dashboard-number-format.spec.ts)
TC-SHR-011HappyformatDashboardWholeNumber never emits fraction digitsUnit✓
TC-SHR-012HappyformatDashboardUsd emits USD currency styleUnit✓
TC-SHR-013HappyformatDashboardUsdInteger rounds to whole dollarsUnit✓
TC-SHR-014HappyformatDashboardDecimalLoose allows 0–2 fraction digitsUnit✓
TC-SHR-015HappyformatDashboardPercentValue formats 0–100 with up to two decimalsUnit✓
TC-SHR-016UnhappyNon-finite input (NaN, Infinity) coerces to 0 safely (no throw)Unit✓
IDClassScenarioAutomation
TC-DES-001HappyDesktop connects bridge with valid terminalId + tokenManual
TC-DES-002UnhappyStale token → server closes socket; UI shows reconnectManual
TC-DES-003Happypax_lan relay reaches pinpad on LANManual
TC-DES-004Happycodepay_ws relay reaches terminal WebSocket URLManual
TC-DES-005UnhappyECR relay timeout → operator sees actionable errorManual

  • Each new shared export used by both apps has a TC-SHR- row
  • Bridge message types from pos-bridge docs mirrored with happy/unhappy
  • Security review cases (token scope, TLS) listed for release checklist

Parent index: System test cases (index)