# REF-TASK-007 — Split KDS browser scenarios without changing evidence

**Status:** Implemented  
**Kind:** Test-only refactor  
**Depends on:** None

## Problem and evidence

`tests/e2e/kds.spec.ts` is about 2,030 lines and combines order entry, queue layout, fulfillment,
metadata editing, checkout safety, sales, failures, responsive behavior, and shared database
cleanup. `journeys.spec.ts` is also sizeable but intentionally groups four headline journeys; it
should not be split merely by line count.

## Proposed change

Split `kds.spec.ts` by stable user behavior (entry/finalization, queue/fulfillment,
sales/reliability, responsive presentation). Move only genuinely shared login, product creation,
order lookup, and cleanup operations into clearly named E2E fixtures. Leave the headline journey
file intact unless future growth demonstrates an independent reason to split it.

## Constraints and sequence

Preserve each Playwright title, exact scenario IDs, projects, database isolation, cleanup semantics,
and use of user-facing roles/names. Do not introduce `data-testid` merely to make the move easier;
REF-TASK-018 owns selector guidance. First move files without helper changes, validate, then extract
repeated fixture code and validate again.

## Validation

Run `pnpm --filter @foodtruck-order/e2e typecheck`, list tests before/after to compare titles and
project count, run the affected Playwright specs against the canonical test environment, run
`pnpm traceability:check`, then `pnpm quality`. Full Docker validation is appropriate if shared
database lifecycle/setup changes; otherwise hosted CI may provide the broader E2E pass.

## Guidance / ADR

REF-TASK-018 should record E2E organization and selector policy. No ADR.
