Skip to content

Commit 788ee21

Browse files
committed
autocomplete test: Make setupToComposeInput accept channels param
1 parent f5f9947 commit 788ee21

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
@@ -32,7 +32,7 @@ late PerAccountStore store;
3232

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

5759
narrow ??= DmNarrow(

0 commit comments

Comments
 (0)