device infos
This commit is contained in:
@@ -9,7 +9,7 @@ import 'package:miler/data/accepted_store.dart';
|
||||
import 'package:miler/data/service_profile.dart';
|
||||
|
||||
import 'package:miler/Models/stop_status.dart';
|
||||
import 'package:miler/data/bag_manifest.dart';
|
||||
import 'package:miler/data/order_manifest.dart';
|
||||
import 'package:miler/views/Dashboard/home/stop_action_sheet.dart';
|
||||
import 'package:miler/views/Dashboard/home/trip.dart';
|
||||
import 'package:miler/views/Dashboard/home/selection_bar.dart';
|
||||
@@ -196,9 +196,9 @@ void main() {
|
||||
// orders for the bar, and the bar is the only thing that commits.
|
||||
expect(find.textContaining('Collect '), findsNothing);
|
||||
// One order, one bag — the two numbers the rider checks against the
|
||||
// shelf, and they are the same number by definition. See [BagManifest].
|
||||
expect(find.text('2 bags'), findsOneWidget);
|
||||
expect(find.text('1 bag'), findsOneWidget);
|
||||
// shelf, and they are the same number by definition. See [OrderManifest].
|
||||
expect(find.text('2 orders'), findsOneWidget);
|
||||
expect(find.text('1 order'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a heading gathers one rung, never a mixed batch', (
|
||||
@@ -246,7 +246,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// The header still says how much of the counter is not his yet.
|
||||
expect(find.text('2 bags · 1 to accept'), findsOneWidget);
|
||||
expect(find.text('2 orders · 1 to accept'), findsOneWidget);
|
||||
|
||||
// And its tick gathers only the orders on one rung. He cannot be handed
|
||||
// food for an order he has not taken on, so a heading that swept both
|
||||
@@ -295,7 +295,7 @@ void main() {
|
||||
stage: StopStatus.arrived,
|
||||
placeName: 'Kitchen 1',
|
||||
count: stops.length,
|
||||
lines: BagManifest.forGroup(stops),
|
||||
lines: OrderManifest.forGroup(stops),
|
||||
onConfirm: (outcome) async {
|
||||
seen = outcome;
|
||||
return null;
|
||||
@@ -308,7 +308,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
if (markMissing.isNotEmpty) {
|
||||
await tester.tap(find.text('Report missing bag'));
|
||||
await tester.tap(find.text('Report a missing order'));
|
||||
await tester.pumpAndSettle();
|
||||
for (final name in markMissing) {
|
||||
await tester.tap(find.text(name));
|
||||
@@ -326,11 +326,11 @@ void main() {
|
||||
// A screen that makes him tick three boxes to record "nothing was wrong"
|
||||
// is a screen he learns to dismiss without reading. So the common case is
|
||||
// a list he reads, and the shortfall is one tap away.
|
||||
expect(find.text('3 bags'), findsOneWidget);
|
||||
expect(find.text('Report missing bag'), findsOneWidget);
|
||||
expect(find.text('3 orders'), findsOneWidget);
|
||||
expect(find.text('Report a missing order'), findsOneWidget);
|
||||
expect(find.text('Missing'), findsNothing);
|
||||
expect(
|
||||
find.text('Make sure all 3 bags are loaded before continuing.'),
|
||||
find.text('Make sure all 3 orders are loaded before continuing.'),
|
||||
findsOneWidget,
|
||||
);
|
||||
});
|
||||
@@ -340,7 +340,7 @@ void main() {
|
||||
) async {
|
||||
await open(tester, 3, markMissing: ['Customer 2']);
|
||||
|
||||
expect(find.text('2 bags · 1 missing'), findsOneWidget);
|
||||
expect(find.text('2 orders · 1 missing'), findsOneWidget);
|
||||
expect(find.text('Missing'), findsOneWidget);
|
||||
expect(
|
||||
find.text('1 of 3 not supplied — they will leave your route.'),
|
||||
@@ -391,7 +391,7 @@ void main() {
|
||||
stage: StopStatus.arrived,
|
||||
placeName: 'Kitchen 1',
|
||||
count: stops.length,
|
||||
lines: BagManifest.forGroup(stops),
|
||||
lines: OrderManifest.forGroup(stops),
|
||||
onConfirm: (outcome) async {
|
||||
captured = outcome;
|
||||
return null;
|
||||
@@ -406,7 +406,7 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.text('Report missing bag'));
|
||||
await tester.tap(find.text('Report a missing order'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Customer 2'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
Reference in New Issue
Block a user