Skip to content

Commit 42f3d21

Browse files
committed
emoji_reaction test: Do a store.setServerEmojiData earlier
The message action sheet is about to condition the appearance of the reactions row on whether we have ServerEmojiData for any of the popular emoji. This test-setup code taps "more" on that row to launch the emoji picker, so the data must be present by the time the action sheet opens.
1 parent f66c812 commit 42f3d21

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/widgets/emoji_reaction_test.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,17 +332,18 @@ void main() {
332332
await tester.pumpWidget(TestZulipApp(accountId: eg.selfAccount.id,
333333
child: MessageListPage(initNarrow: narrow)));
334334

335+
store.setServerEmojiData(eg.serverEmojiDataPopularPlus(
336+
ServerEmojiData(codeToNames: {
337+
'1f4a4': ['zzz', 'sleepy'], // (just 'zzz' in real data)
338+
})));
339+
335340
// global store, per-account store, and message list get loaded
336341
await tester.pumpAndSettle();
337342
// request the message action sheet
338343
await tester.longPress(find.byType(MessageContent));
339344
// sheet appears onscreen; default duration of bottom-sheet enter animation
340345
await tester.pump(const Duration(milliseconds: 250));
341346

342-
store.setServerEmojiData(eg.serverEmojiDataPopularPlus(
343-
ServerEmojiData(codeToNames: {
344-
'1f4a4': ['zzz', 'sleepy'], // (just 'zzz' in real data)
345-
})));
346347
await store.handleEvent(RealmEmojiUpdateEvent(id: 1, realmEmoji: {
347348
'1': eg.realmEmojiItem(emojiCode: '1', emojiName: 'buzzing'),
348349
}));

0 commit comments

Comments
 (0)