Skip to content

Commit 64cfee9

Browse files
committed
home test: Finish making menu tests robust to route animation changes
1 parent 67842c0 commit 64cfee9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/widgets/home_test.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,12 @@ void main () {
291291
await tapButtonAndAwaitTransition(tester, combinedFeedMenuIconFinder);
292292

293293
// When we go back to the home page, the menu sheet should be gone.
294+
final topBeforePop = topRoute;
295+
check(topBeforePop).isNotNull().isA<MaterialAccountWidgetRoute>()
296+
.page.isA<MessageListPage>().initNarrow.equals(CombinedFeedNarrow());
294297
(await ZulipApp.navigator).pop();
295-
await tester.pump(const Duration(milliseconds: 350)); // wait for pop animation
298+
await tester.pump((topBeforePop as TransitionRoute).reverseTransitionDuration);
299+
296300
check(find.byType(BottomSheet)).findsNothing();
297301
});
298302

0 commit comments

Comments
 (0)