From 54f0538908c725b560252bfbb34b451e85f39ca6 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 18 Dec 2024 20:47:34 -0800 Subject: [PATCH] home test [nfc]: Move specific prep into specific tests And it turns out the stream and subscription weren't being used at all. --- test/widgets/home_test.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/widgets/home_test.dart b/test/widgets/home_test.dart index 1cfdc52944..63cc665210 100644 --- a/test/widgets/home_test.dart +++ b/test/widgets/home_test.dart @@ -31,11 +31,7 @@ void main () { addTearDown(testBinding.reset); await testBinding.globalStore.add(eg.selfAccount, eg.initialSnapshot()); store = await testBinding.globalStore.perAccount(eg.selfAccount.id); - - await store.addUsers([eg.selfUser, eg.otherUser]); - final stream = eg.stream(); - await store.addStream(stream); - await store.addSubscription(eg.subscription(stream)); + await store.addUser(eg.selfUser); await tester.pumpWidget(TestZulipApp( accountId: eg.selfAccount.id, @@ -46,6 +42,7 @@ void main () { group('bottom nav navigation', () { testWidgets('preserve states when switching between views', (tester) async { await prepare(tester); + await store.addUser(eg.otherUser); await store.handleEvent(MessageEvent( id: 0, message: eg.dmMessage(from: eg.otherUser, to: [eg.selfUser]))); await tester.pump();