Skip to content

Commit f2fc65c

Browse files
committed
autocomplete test: Make setupToComposeInput accept channels param
1 parent c584d1b commit f2fc65c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/widgets/autocomplete_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ late PerAccountStore store;
3131

3232
/// Simulates loading a [MessageListPage] and tapping to focus the compose input.
3333
///
34-
/// Also adds [users] to the [PerAccountStore],
34+
/// Also adds [users] and [channels] to the [PerAccountStore],
3535
/// so they can show up in autocomplete.
3636
///
3737
/// Also sets [debugNetworkImageHttpClientProvider] to return a constant image.
@@ -40,6 +40,7 @@ late PerAccountStore store;
4040
/// before the end of the test.
4141
Future<Finder> setupToComposeInput(WidgetTester tester, {
4242
List<User> users = const [],
43+
List<ZulipStream> channels = const [],
4344
Narrow? narrow,
4445
}) async {
4546
assert(narrow is ChannelNarrow? || narrow is SendableNarrow?);
@@ -51,6 +52,7 @@ Future<Finder> setupToComposeInput(WidgetTester tester, {
5152
store = await testBinding.globalStore.perAccount(eg.selfAccount.id);
5253
await store.addUsers([eg.selfUser, eg.otherUser]);
5354
await store.addUsers(users);
55+
await store.addStreams(channels);
5456
final connection = store.connection as FakeApiConnection;
5557

5658
narrow ??= DmNarrow(

0 commit comments

Comments
 (0)