Skip to content

Commit c27b9f4

Browse files
committed
action_sheet test: Use eg.otherUser for a sender in setupToTopicActionSheet
Just to make this logic more similar to a `prepare` function in a different group, to prepare (heh) for moving that `prepare` function out and reusing it here.
1 parent 449f3d7 commit c27b9f4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/widgets/action_sheet_test.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,18 @@ void main() {
238238
final subscriptions = isChannelMuted == null ? <Subscription>[]
239239
: [eg.subscription(channel, isMuted: isChannelMuted)];
240240
await testBinding.globalStore.add(account, eg.initialSnapshot(
241-
realmUsers: [eg.selfUser],
241+
realmUsers: [eg.selfUser, eg.otherUser],
242242
streams: [channel],
243243
subscriptions: subscriptions,
244244
userTopics: [eg.userTopicItem(channel, topic, visibilityPolicy)],
245245
zulipFeatureLevel: zulipFeatureLevel));
246246
store = await testBinding.globalStore.perAccount(account.id);
247247
connection = store.connection as FakeApiConnection;
248248

249+
final message = eg.streamMessage(
250+
stream: channel, topic: topic, sender: eg.otherUser);
249251
connection.prepare(json: eg.newestGetMessagesResult(
250-
foundOldest: true, messages: [
251-
eg.streamMessage(stream: channel, topic: topic)]).toJson());
252+
foundOldest: true, messages: [message]).toJson());
252253
await tester.pumpWidget(TestZulipApp(accountId: account.id,
253254
child: MessageListPage(
254255
initNarrow: eg.topicNarrow(channel.streamId, topic))));

0 commit comments

Comments
 (0)