Skip to content

Commit 519deeb

Browse files
committed
actions test [nfc]: Have prepare take an optional ackedPushToken
We'll use this soon for testing the unregister-token part of logging out.
1 parent 915b80d commit 519deeb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/widgets/actions_test.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ void main() {
3030

3131
Future<void> prepare(WidgetTester tester, {
3232
UnreadMessagesSnapshot? unreadMsgs,
33+
String? ackedPushToken = '123',
3334
}) async {
3435
addTearDown(testBinding.reset);
35-
await testBinding.globalStore.add(eg.selfAccount, eg.initialSnapshot(
36+
final selfAccount = eg.selfAccount.copyWith(ackedPushToken: Value(ackedPushToken));
37+
await testBinding.globalStore.add(selfAccount, eg.initialSnapshot(
3638
unreadMsgs: unreadMsgs));
37-
store = await testBinding.globalStore.perAccount(eg.selfAccount.id);
39+
store = await testBinding.globalStore.perAccount(selfAccount.id);
3840
connection = store.connection as FakeApiConnection;
3941

40-
await tester.pumpWidget(TestZulipApp(accountId: eg.selfAccount.id,
42+
await tester.pumpWidget(TestZulipApp(accountId: selfAccount.id,
4143
child: const Scaffold(body: Placeholder())));
4244
await tester.pump();
4345
context = tester.element(find.byType(Placeholder));

0 commit comments

Comments
 (0)