miler map
This commit is contained in:
@@ -854,9 +854,15 @@ void main() {
|
||||
expect(find.text('All 3 selected · Clear'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('stays away when there is only one stop to pick', (
|
||||
tester,
|
||||
) async {
|
||||
testWidgets('a lone stop gets its place\'s own select-all', (tester) async {
|
||||
// ── This asserted `findsNothing`, and the shape changed under it ──
|
||||
//
|
||||
// The run-level control still stays away for one stop — its own row is
|
||||
// the select-all. What appears instead is the *place's*: a stop with an
|
||||
// address is a place holding one order, and a place carries a select-all
|
||||
// over its own orders however many it has. The milk run has always drawn
|
||||
// `Select all 1` on a one-order counter; the parcel line draws places
|
||||
// now, so it draws it too.
|
||||
await pump(
|
||||
tester,
|
||||
TripCard(
|
||||
@@ -866,7 +872,7 @@ void main() {
|
||||
onAcceptSelected: (_) async {},
|
||||
),
|
||||
);
|
||||
expect(find.textContaining('Select all'), findsNothing);
|
||||
expect(find.text('Select all 1'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -986,11 +992,20 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
// The position sits on the timeline node's own meta line now, rather
|
||||
// than on the card's facts line — but it is still the trip's own index
|
||||
// and not the visible list's, which is the whole contract.
|
||||
expect(find.textContaining('Stop 2'), findsOneWidget);
|
||||
// ── `Stop N` is gone from the parcel route, with the flat node ──
|
||||
//
|
||||
// Home draws places on both lines now: the header names where the work
|
||||
// is, the rail under it names who. `Stop N` was the *flat* node's meta
|
||||
// line, and there are no flat nodes on a route whose stops have
|
||||
// addresses. The run position is the place's numeral instead.
|
||||
//
|
||||
// The contract underneath it — a stop is never renamed mid-shift — is
|
||||
// carried by the group: a finished place settles rather than vanishing,
|
||||
// so the sequence does not slide up. What this can still hold is that
|
||||
// the picked stop has left the list and the remaining one is drawn.
|
||||
expect(find.textContaining('Stop 1'), findsNothing);
|
||||
expect(find.text('B'), findsNothing, reason: 'ids are not on the row');
|
||||
expect(find.text('1 order'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user