V3-05: mounted (handlebar) mode

Wake lock via a WakelockController seam (mirrors LocationSource), gated strictly to actual recording and released on stop/discard/navigate-away/dispose. High-contrast ripprMountedTheme() applied only to the record screen. BigStat gained a scale param for the headline figure rather than a blanket TextTheme.apply, which crashes on Material 3's default theme.
This commit is contained in:
2026-08-17 14:55:47 -05:00
parent f3c7e2d6b4
commit fbdb55258c
14 changed files with 401 additions and 19 deletions

View File

@@ -74,6 +74,22 @@ void main() {
expect(config.unitSystem, UnitSystem.metric);
});
testWidgets('the mounted mode switch writes through to Config (V3-05)',
(tester) async {
await tester.pumpWidget(host());
await tester.pumpAndSettle();
final initial = tester
.widget<SwitchListTile>(find.byKey(const Key('mounted-mode-switch')))
.value;
expect(initial, isFalse, reason: 'a pocketed ride is still the common case');
await tester.tap(find.byKey(const Key('mounted-mode-switch')));
await tester.pumpAndSettle();
expect(config.mountedMode, isTrue);
});
group('upload endpoint', () {
testWidgets('a valid https URL is saved', (tester) async {
await tester.pumpWidget(host());
@@ -143,6 +159,10 @@ void main() {
expect(find.text(config.deviceId), findsOneWidget);
expect(find.byKey(const Key('copy-device-id')), findsOneWidget);
// The list has grown past one screen (V3-05 added a section above this), so the
// control is not necessarily within the default test viewport.
await tester.drag(find.byType(ListView).first, const Offset(0, -400));
await tester.pumpAndSettle();
// Tapping must not throw even though no real clipboard exists in the test harness.
await tester.tap(find.byKey(const Key('copy-device-id')));
await tester.pumpAndSettle();