feat: add two-tab timetable UI and glass dock
This commit is contained in:
@@ -35,6 +35,32 @@ void main() {
|
||||
);
|
||||
});
|
||||
tearDown(() => controller.dispose());
|
||||
test('a new successful demo action clears a stale save error', () async {
|
||||
await controller.initialize();
|
||||
store.failSave = true;
|
||||
await controller.updateSettings(
|
||||
controller.snapshot.settings.copyWith(reminderMinutes: 30),
|
||||
);
|
||||
expect(controller.lastError, isNotNull);
|
||||
await controller.showDemo();
|
||||
expect(controller.lastError, isNull);
|
||||
});
|
||||
test(
|
||||
'refresh after corrupt storage never reconciles an empty timetable',
|
||||
() async {
|
||||
final damaged = AppController(
|
||||
DamagedStore(),
|
||||
notifications,
|
||||
calendar,
|
||||
() => DateTime.utc(2026, 9, 8),
|
||||
);
|
||||
await damaged.initialize();
|
||||
await damaged.refreshServices();
|
||||
expect(notifications.reconciliations, 0);
|
||||
expect(damaged.storageReady, isFalse);
|
||||
damaged.dispose();
|
||||
},
|
||||
);
|
||||
test('failed saving does not change currently visible settings', () async {
|
||||
await controller.initialize();
|
||||
store.failSave = true;
|
||||
@@ -90,3 +116,8 @@ void main() {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class DamagedStore extends MemoryStore {
|
||||
@override
|
||||
Future<AppSnapshot?> load() async => throw const FormatException('damaged');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user