device infos
This commit is contained in:
@@ -14,7 +14,7 @@ import 'package:miler/views/Dashboard/home/trip_card.dart';
|
||||
/// under it, ticked in batches and advanced with one gesture:
|
||||
///
|
||||
/// ```
|
||||
/// Vidhya Kitchen · 4 bags · 2 to accept ˅
|
||||
/// Vidhya Kitchen · 4 orders · 2 to accept ˅
|
||||
/// ◉ Joe Gandhipuram Bag 1
|
||||
/// ◉ Priya RS Puram Bag 2
|
||||
/// ```
|
||||
@@ -153,7 +153,9 @@ void main() {
|
||||
// the detail sheet and the Activity record.
|
||||
expect(find.text('Gandhipuram'), findsOneWidget);
|
||||
expect(find.textContaining('1001'), findsNothing);
|
||||
expect(find.text('Bag 1'), findsOneWidget);
|
||||
// And no invented shelf reference beside it: this counter printed
|
||||
// nothing, so the row carries the person and the area and stops there.
|
||||
expect(find.text('Bag 1'), findsNothing);
|
||||
});
|
||||
|
||||
// Updated when `areaOf` was corrected against real Coimbatore addresses
|
||||
@@ -181,19 +183,25 @@ void main() {
|
||||
expect(find.text(''), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('one order is one bag, counted off the orders', (tester) async {
|
||||
testWidgets('the load is stated once, and counted off the orders', (
|
||||
tester,
|
||||
) async {
|
||||
await pump(tester, [
|
||||
order('1001', 'Joe', 'Gandhipuram, Coimbatore'),
|
||||
order('1002', 'Priya', 'RS Puram, Coimbatore'),
|
||||
order('1003', 'Arun', 'Peelamedu, Coimbatore'),
|
||||
]);
|
||||
// The header states the load once, in the unit the rider carries; the
|
||||
// check that orders and bags agree is the manifest itself, one named
|
||||
// bag per order. `N orders · N bags` was the same number twice and it
|
||||
// cost the header its `to accept` clause on a real route.
|
||||
expect(find.textContaining('3 bags'), findsWidgets);
|
||||
for (final bag in const ['Bag 1', 'Bag 2', 'Bag 3']) {
|
||||
expect(find.text(bag), findsOneWidget);
|
||||
// The header states the load once. `N orders · N bags` was the same
|
||||
// number twice and it cost the header its `to accept` clause on a real
|
||||
// route; the derived per-row numbering that made up the second half is
|
||||
// gone entirely.
|
||||
expect(find.textContaining('3 orders'), findsWidgets);
|
||||
for (final invented in const ['Bag 1', 'Bag 2', 'Bag 3']) {
|
||||
expect(find.text(invented), findsNothing);
|
||||
}
|
||||
// One row per order, named by the person it is for.
|
||||
for (final who in const ['Joe', 'Priya', 'Arun']) {
|
||||
expect(find.textContaining(who), findsWidgets);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -213,7 +221,7 @@ void main() {
|
||||
|
||||
// The rider is mid-decision at one counter; the count of what is still
|
||||
// undecided is the whole content of that state.
|
||||
expect(find.textContaining('4 bags'), findsWidgets);
|
||||
expect(find.textContaining('4 orders'), findsWidgets);
|
||||
expect(find.textContaining('to accept'), findsWidgets);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user