You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(server-app): end-to-end multi-station KOT routing from the waiter app #1348
Parent: #830 (chat leftovers). Good first issue. Verified against main @ 8e39053.
Context
Users asked whether orders sent from the waiter app (Server App) print to the right kitchen station printers (12 Sep). In code, they do:
frontend/src/app/server-standalone/page.tsx calls printKotForOrder after Send, which posts /api/printers/print-kot with no stationName (~L770-777, L959-963). It is proxied by main/server-app.ts ~L432.
main/routes/printers.ts ~L1226-1320: with no station, routeItemsToStations (~L1166) groups items by category station printer. Unmatched items go to the default Kitchen ticket.
But nothing tests this end to end. frontend/e2e/server-app-ordering.spec.ts (~L196-248) mocks print-kot, and tests/issue-134-station-routing.test.ts tests only the routing function.
Task
Add an integration test that sends an order through the Server App path, with two categories mapped to two station printers, and asserts that two KOT dispatches happen with the right items each. Stub the printer dispatch layer, not the route.
Acceptance
The test fails if routing is bypassed (for example, everything goes to one ticket).
It is wired into package.json so npm run test:script-coverage passes.
Activity