Refresh the Flutter snapshot: v3 tickets V3-04 through V3-16, plus a fresh installable APK
V3-04 through V3-07, V3-10, V3-16 shipped complete; V3-11/V3-12/V3-14 shipped code-complete pending device/account verification; V3-08/V3-09 deferred behind a new V3-17 (self-hosted OSRM investigation). 316 tests passing, up from 221. The APK is a fresh release build (debug-signed, no release signing config exists yet) with two build fixes applied: core library desugaring enabled for flutter_local_notifications, and sentry_flutter bumped to 9.27.0 (8.14.2's bundled Kotlin plugin was incompatible with this project's Kotlin 2.4.0 toolchain).
This commit is contained in:
@@ -336,6 +336,50 @@ void main() {
|
||||
reason: 'the dead time is a real gap and must render as one');
|
||||
});
|
||||
|
||||
test('a recording trip found at restart reports an unexpected stop (V3-12)',
|
||||
() async {
|
||||
await engine.start();
|
||||
await ride(5);
|
||||
await engine.dispose();
|
||||
|
||||
String? reportedReason;
|
||||
final revived = RecordingEngine(
|
||||
repository: repo,
|
||||
locationSource: source,
|
||||
clock: () => fakeNow,
|
||||
onUnexpectedStop: (reason) => reportedReason = reason,
|
||||
);
|
||||
addTearDown(revived.dispose);
|
||||
|
||||
fakeNow = 20000;
|
||||
await revived.restoreAfterProcessDeath();
|
||||
|
||||
expect(reportedReason, isNotNull,
|
||||
reason: 'the recording stopped without anyone choosing that -- the exact '
|
||||
'failure V3-12 exists to surface');
|
||||
});
|
||||
|
||||
test('a cleanly-completed trip reports nothing at restart', () async {
|
||||
await engine.start();
|
||||
await ride(5);
|
||||
await engine.stop();
|
||||
await engine.dispose();
|
||||
|
||||
var called = false;
|
||||
final revived = RecordingEngine(
|
||||
repository: repo,
|
||||
locationSource: source,
|
||||
clock: () => fakeNow,
|
||||
onUnexpectedStop: (_) => called = true,
|
||||
);
|
||||
addTearDown(revived.dispose);
|
||||
|
||||
await revived.restoreAfterProcessDeath();
|
||||
|
||||
expect(called, isFalse,
|
||||
reason: 'a rider who pressed Stop is not a crash and must not be reported');
|
||||
});
|
||||
|
||||
test('the dead time is never measured as distance', () async {
|
||||
// The bug this guards is in the native app: after a crash the open segment is
|
||||
// adopted rather than closed, so computeSummary -- the authoritative pass at trip
|
||||
|
||||
Reference in New Issue
Block a user