miler map
This commit is contained in:
@@ -189,11 +189,23 @@ void main() {
|
||||
expect(find.text('START · KITCHEN'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('gets no kitchen sections and no meal chrome', (tester) async {
|
||||
// Nothing from the meal run may leak onto a parcel route. The *source
|
||||
// pill* is data-driven and stays if a parcel payload ever names one —
|
||||
// see [StopSourceLine] — but the grouping, its counts and its bulk
|
||||
// collect are meal-flow structure and must not appear.
|
||||
testWidgets('gets no meal VOCABULARY, though it now shares the shape', (
|
||||
tester,
|
||||
) async {
|
||||
// ── What changed, and what did not ──
|
||||
//
|
||||
// This used to assert that a parcel route got no grouping at all: no
|
||||
// place header, no counts under it, the header *is* the stop. That was
|
||||
// the rule, and it has been reversed deliberately — Home draws places on
|
||||
// both lines now, because the header names *where* and the row under it
|
||||
// names *who*, and a collection needs both. Asked for directly, against
|
||||
// screenshots of the two screens side by side.
|
||||
//
|
||||
// What must still never leak is the meal run's **words**. Shape is a
|
||||
// layout decision and the two lines can share one; `meal`, `MEAL` and
|
||||
// "ready to collect" are the other line's vocabulary for the other line's
|
||||
// work, and a logistics rider must never be shown them. That is the half
|
||||
// of this test that was always the point, and it is untouched.
|
||||
await pumpRoute(
|
||||
tester,
|
||||
stops: [stop(id: '1', kitchen: 'Kitchen 1')],
|
||||
@@ -201,15 +213,11 @@ void main() {
|
||||
expect(find.text('1 meal · 1 to accept'), findsNothing);
|
||||
expect(find.textContaining('ready to collect'), findsNothing);
|
||||
expect(find.text('MEAL'), findsNothing);
|
||||
// The stop is drawn — it is just drawn flat. A parcel route has no
|
||||
// counter to group under, so the timeline is one node per stop and the
|
||||
// header *is* the stop. `PICKUP` was the card's type mark; the type is
|
||||
// progressive disclosure in the detail sheet now.
|
||||
|
||||
// The place is headed by what the payload named it, and the customer is
|
||||
// the row under it — the milk run's shape, in the parcel line's words.
|
||||
expect(find.text('Kitchen 1'), findsOneWidget);
|
||||
expect(find.text('Customer 1'), findsOneWidget);
|
||||
expect(find.text('Kitchen 1'), findsNothing);
|
||||
// "Collect 1" on the meta line is the parcel card's own count of what he
|
||||
// is picking up at this door, and stays. The heading assertions above are
|
||||
// what tell the two apart.
|
||||
});
|
||||
|
||||
test('still works bookings', () {
|
||||
|
||||
Reference in New Issue
Block a user