Fix cached reminder recovery and retain pre-reconcile idle diagnostics
This commit is contained in:
@@ -37,6 +37,14 @@ class _Notifications extends FakeNotifications {
|
||||
'model': 'TestModel',
|
||||
'sdk': 35,
|
||||
'backgroundRestricted': true,
|
||||
'standbyBucket': 45,
|
||||
'startupAlarmAudit': {
|
||||
'capturedAtEpochMillis': 123,
|
||||
'cachedCourseCount': 3,
|
||||
'existingHandleCount': 1,
|
||||
'missingHandleCount': 2,
|
||||
'courseName': 'Private course name',
|
||||
},
|
||||
'account': 'private@example.com',
|
||||
},
|
||||
'courseNames': ['Private course name'],
|
||||
@@ -129,7 +137,7 @@ void main() {
|
||||
final previous = notifications.reconciliations;
|
||||
await tester.tap(find.text('检查提醒'));
|
||||
await tester.pump();
|
||||
expect(notifications.reconciliationsAtDiagnosis, previous + 1);
|
||||
expect(notifications.reconciliationsAtDiagnosis, previous);
|
||||
for (final button in tester.widgetList<TextButton>(
|
||||
find.byType(TextButton),
|
||||
)) {
|
||||
@@ -174,5 +182,12 @@ void main() {
|
||||
expect(report['courseCount'], 0);
|
||||
expect(report['appVersion'], isNotEmpty);
|
||||
expect((report['system'] as Map)['model'], 'TestModel');
|
||||
expect(
|
||||
((report['system'] as Map)['startupAlarmAudit']
|
||||
as Map)['missingHandleCount'],
|
||||
2,
|
||||
);
|
||||
expect((report['beforeCheck'] as Map)['pendingCount'], 2);
|
||||
expect(find.textContaining('系统待机限制'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user