production

This commit is contained in:
2026-08-28 11:13:15 +05:30
parent d7348e253f
commit 5723d373b2
162 changed files with 17924 additions and 7026 deletions

View File

@@ -155,11 +155,31 @@ void main() {
);
});
test('and arriving is what puts him on the stop', () {
test('and arriving is its own rung, not "active"', () {
// ── The two used to be one, and it cost the rider his arrival ──
//
// `stopStateOf` folded `arrived` into [StopState.active], so the Home row
// had no arrived to render and the live chip printed the literal word
// **Active** the moment he slid *confirm arrival*. The rung had moved,
// `/reached` had fired and the local record was written — and the one
// word on screen said something else, which is indistinguishable from
// the arrival not registering.
//
// They are different facts: arrived is a rung on the pickup ladder, and
// active is the backend's word for a delivery under way.
final stop = {'orderid': 'A1', 'orderstatus': 'arrived'};
expect(
stopStateOf(stop, acceptedIds: const {}, rejectedIds: const {}),
StopState.arrived,
);
expect(
stopStateOf(
{'orderid': 'A1', 'orderstatus': 'active'},
acceptedIds: const {},
rejectedIds: const {},
),
StopState.active,
reason: 'and active still means active',
);
});