File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import 'package:flutter_test/flutter_test.dart';
77import 'package:http/http.dart' as http;
88import 'package:http/testing.dart' as http_testing;
99import 'package:zulip/model/actions.dart' ;
10+ import 'package:zulip/model/push_device.dart' ;
1011import 'package:zulip/model/store.dart' ;
1112import 'package:zulip/notifications/receive.dart' ;
1213
@@ -147,6 +148,8 @@ void main() {
147148 }));
148149
149150 test ('notifications are removed after logout' , () => awaitFakeAsync ((async ) async {
151+ PushDeviceManager .debugAutoPause = true ;
152+ addTearDown (() => PushDeviceManager .debugAutoPause = false );
150153 await prepare ();
151154 testBinding.firebaseMessagingInitialToken = '123' ;
152155 addTearDown (NotificationService .debugReset);
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import 'package:zulip/host/notifications.dart';
1010import 'package:zulip/model/database.dart' ;
1111import 'package:zulip/model/localizations.dart' ;
1212import 'package:zulip/model/narrow.dart' ;
13+ import 'package:zulip/model/push_device.dart' ;
1314import 'package:zulip/notifications/open.dart' ;
1415import 'package:zulip/notifications/receive.dart' ;
1516import 'package:zulip/widgets/app.dart' ;
@@ -80,6 +81,8 @@ void main() {
8081 testBinding.firebaseMessagingInitialToken = '012abc' ;
8182 addTearDown (NotificationService .debugReset);
8283 NotificationService .debugBackgroundIsolateIsLive = false ;
84+ PushDeviceManager .debugAutoPause = true ;
85+ addTearDown (() => PushDeviceManager .debugAutoPause = false );
8386 await NotificationService .instance.start ();
8487 }
8588
You can’t perform that action at this time.
0 commit comments