Skip to content

Commit 313f8ca

Browse files
MTtankkeognprice
authored andcommitted
emoji_reaction test: Use pumpAndSettle to let overscroll animation finish
These tests scroll a long way, in order to be sure to scroll to the end of the list. That means they invoke overscroll. The details of how overscroll behaves are changing in an upstream PR: flutter/flutter#173849 The new behavior will take more than a single `pump` to reach the end state where the subsequent checks behave as expected. These tests aren't about the overscroll behavior, so just gloss over any wrinkles by calling `pumpAndSettle`.
1 parent f304ec4 commit 313f8ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/widgets/emoji_reaction_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ void main() {
613613

614614
// Scroll to the very bottom of the list with a large offset.
615615
await tester.drag(scrollViewFinder, Offset(0, -500));
616-
await tester.pump();
616+
await tester.pumpAndSettle(); // let overscroll finish
617617
// The top edge of the list entries is out of view;
618618
// the bottom is padded by 8px, the minimum padding, from the bottom
619619
// edge of the scroll view.
@@ -637,7 +637,7 @@ void main() {
637637

638638
// Scroll to the very bottom of the list with a large offset.
639639
await tester.drag(scrollViewFinder, Offset(0, -500));
640-
await tester.pump();
640+
await tester.pumpAndSettle(); // let overscroll finish
641641
// The top edge of the list entries is out of view;
642642
// the bottom edge is padded by 10px from the bottom edge of the scroll
643643
// view, because the view bottom padding is larger than the minimum 8px.

0 commit comments

Comments
 (0)