Skip to content

Commit e094fdc

Browse files
committed
home test: Remove an unnecessary tester.pump for a route animation
This test doesn't need to check the widget tree after waiting for the route animation to complete. The navigator observer is alerted when the navigation action is dispatched, not when its animation completes, so it's fine to check pushedRoutes before waiting through the animation. (It still needs a Duration.zero wait so that a FakeApiConnection timer isn't still pending at the end of the test.)
1 parent dbc3488 commit e094fdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/widgets/home_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ void main () {
128128
foundOldest: true, messages: []).toJson());
129129
await tester.tap(find.byIcon(ZulipIcons.message_feed));
130130
await tester.pump();
131-
await tester.pump(const Duration(milliseconds: 250));
132131
check(pushedRoutes).single.isA<WidgetRoute>().page
133132
.isA<MessageListPage>()
134133
.initNarrow.equals(const CombinedFeedNarrow());
134+
await tester.pump(Duration.zero); // message-list fetch
135135
});
136136
});
137137

0 commit comments

Comments
 (0)