Skip to content

test(server-app): end-to-end multi-station KOT routing from the waiter app #1348

Closed

Description

@khaira777

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

  1. khaira777 commented on Oct 27, 2026

    @khaira777
    ContributorAuthor

    Looking into this issue now.

  2. added a commit that references this issue on Oct 28, 2026
    a860e93
  3. added a commit that references this issue on Nov 2, 2026
    306bf32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions