File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -104,5 +104,23 @@ void main() {
104
104
await tester.pump ();
105
105
check (isButtonVisible (tester)).equals (false );
106
106
});
107
+
108
+ testWidgets ('button functionality' , (WidgetTester tester) async {
109
+ final stream = eg.stream ();
110
+ await setupMessageListPage (tester, narrow: StreamNarrow (stream.streamId));
111
+
112
+ final scrollController = findMessageListScrollController (tester)! ;
113
+
114
+ // Initial state should be not visible, as the message list renders with latest message in view
115
+ check (isButtonVisible (tester)).equals (false );
116
+
117
+ scrollController.jumpTo (600 );
118
+ await tester.pump ();
119
+ check (isButtonVisible (tester)).equals (true );
120
+
121
+ await tester.tap (find.byType (ScrollToBottomButton ));
122
+ await tester.pumpAndSettle ();
123
+ check (isButtonVisible (tester)).equals (false );
124
+ });
107
125
});
108
126
}
You can’t perform that action at this time.
0 commit comments