@@ -28,7 +28,6 @@ import '../api/fake_api.dart';
28
28
import '../example_data.dart' as eg;
29
29
import '../model/binding.dart' ;
30
30
import '../model/content_test.dart' ;
31
- import '../model/message_list_test.dart' ;
32
31
import '../model/test_store.dart' ;
33
32
import '../flutter_checks.dart' ;
34
33
import '../stdlib_checks.dart' ;
@@ -70,7 +69,7 @@ void main() {
70
69
return eg.streamMessage (sender: eg.selfUser);
71
70
});
72
71
connection.prepare (json:
73
- newestResult (foundOldest: foundOldest, messages: messages).toJson ());
72
+ eg. newestGetMessagesResult (foundOldest: foundOldest, messages: messages).toJson ());
74
73
75
74
await tester.pumpWidget (TestZulipApp (accountId: eg.selfAccount.id,
76
75
child: MessageListPage (initNarrow: narrow)));
@@ -189,7 +188,7 @@ void main() {
189
188
await tester.pump ();
190
189
191
190
// ... and we should fetch more messages as we go.
192
- connection.prepare (json: olderResult (anchor: 950 , foundOldest: false ,
191
+ connection.prepare (json: eg. olderGetMessagesResult (anchor: 950 , foundOldest: false ,
193
192
messages: List .generate (100 , (i) => eg.streamMessage (id: 850 + i, sender: eg.selfUser))).toJson ());
194
193
await tester.pump (const Duration (seconds: 3 )); // Fast-forward to end of fling.
195
194
await tester.pump (Duration .zero); // Allow a frame for the response to arrive.
@@ -208,7 +207,7 @@ void main() {
208
207
await tester.pump ();
209
208
210
209
// ... and we fetch more messages as we go.
211
- connection.prepare (json: olderResult (anchor: 950 , foundOldest: false ,
210
+ connection.prepare (json: eg. olderGetMessagesResult (anchor: 950 , foundOldest: false ,
212
211
messages: List .generate (100 , (i) => eg.streamMessage (id: 850 + i, sender: eg.selfUser))).toJson ());
213
212
for (int i = 0 ; i < 30 ; i++ ) {
214
213
// Find the point in the fling where the fetch starts.
@@ -220,7 +219,7 @@ void main() {
220
219
221
220
// On the next frame, we promptly fetch *another* batch.
222
221
// This is a glitch and it'd be nicer if we didn't.
223
- connection.prepare (json: olderResult (anchor: 850 , foundOldest: false ,
222
+ connection.prepare (json: eg. olderGetMessagesResult (anchor: 850 , foundOldest: false ,
224
223
messages: List .generate (100 , (i) => eg.streamMessage (id: 750 + i, sender: eg.selfUser))).toJson ());
225
224
await tester.pump (const Duration (milliseconds: 1 ));
226
225
await tester.pump (Duration .zero);
@@ -619,7 +618,7 @@ void main() {
619
618
final narrow = TopicNarrow (channel.streamId, topic);
620
619
621
620
void prepareGetMessageResponse (List <Message > messages) {
622
- connection.prepare (json: newestResult (
621
+ connection.prepare (json: eg. newestGetMessagesResult (
623
622
foundOldest: false , messages: messages).toJson ());
624
623
}
625
624
0 commit comments