Skip to content

Commit

Permalink
home test [nfc]: Move specific prep into specific tests
Browse files Browse the repository at this point in the history
And it turns out the stream and subscription weren't being used
at all.
  • Loading branch information
gnprice authored and chrisbobbe committed Dec 19, 2024
1 parent d90c5a0 commit 54f0538
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/widgets/home_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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();
Expand Down

0 comments on commit 54f0538

Please sign in to comment.