Skip to content

Commit 8ee79b4

Browse files
committed
emoji_reaction test [nfc]: Pull out some data for other tests to use
1 parent ec9c1dd commit 8ee79b4

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/widgets/emoji_reaction_test.dart

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,20 @@ void main() {
5454
await fontLoader.load();
5555
}
5656

57+
// Base JSON for various unicode emoji reactions. Just missing user_id.
58+
final u1 = {'emoji_name': '+1', 'emoji_code': '1f44d', 'reaction_type': 'unicode_emoji'};
59+
final u2 = {'emoji_name': 'family_man_man_girl_boy', 'emoji_code': '1f468-200d-1f468-200d-1f467-200d-1f466', 'reaction_type': 'unicode_emoji'};
60+
final u3 = {'emoji_name': 'slight_smile', 'emoji_code': '1f642', 'reaction_type': 'unicode_emoji'};
61+
final u4 = {'emoji_name': 'tada', 'emoji_code': '1f389', 'reaction_type': 'unicode_emoji'};
62+
final u5 = {'emoji_name': 'exploding_head', 'emoji_code': '1f92f', 'reaction_type': 'unicode_emoji'};
63+
64+
// Base JSON for various realm-emoji reactions. Just missing user_id.
65+
final i1 = {'emoji_name': 'twocents', 'emoji_code': '181', 'reaction_type': 'realm_emoji'};
66+
final i2 = {'emoji_name': 'threecents', 'emoji_code': '182', 'reaction_type': 'realm_emoji'};
67+
68+
// Base JSON for the one "Zulip extra emoji" reaction. Just missing user_id.
69+
final z1 = {'emoji_name': 'zulip', 'emoji_code': 'zulip', 'reaction_type': 'zulip_extra_emoji'};
70+
5771
Future<void> setupChipsInBox(WidgetTester tester, {
5872
required List<Reaction> reactions,
5973
double width = 245.0, // (seen in context on an iPhone 13 Pro)
@@ -159,20 +173,6 @@ void main() {
159173
skip: io.Platform.isMacOS);
160174
}
161175

162-
// Base JSON for various unicode emoji reactions. Just missing user_id.
163-
final u1 = {'emoji_name': '+1', 'emoji_code': '1f44d', 'reaction_type': 'unicode_emoji'};
164-
final u2 = {'emoji_name': 'family_man_man_girl_boy', 'emoji_code': '1f468-200d-1f468-200d-1f467-200d-1f466', 'reaction_type': 'unicode_emoji'};
165-
final u3 = {'emoji_name': 'slight_smile', 'emoji_code': '1f642', 'reaction_type': 'unicode_emoji'};
166-
final u4 = {'emoji_name': 'tada', 'emoji_code': '1f389', 'reaction_type': 'unicode_emoji'};
167-
final u5 = {'emoji_name': 'exploding_head', 'emoji_code': '1f92f', 'reaction_type': 'unicode_emoji'};
168-
169-
// Base JSON for various realm-emoji reactions. Just missing user_id.
170-
final i1 = {'emoji_name': 'twocents', 'emoji_code': '181', 'reaction_type': 'realm_emoji'};
171-
final i2 = {'emoji_name': 'threecents', 'emoji_code': '182', 'reaction_type': 'realm_emoji'};
172-
173-
// Base JSON for the one "Zulip extra emoji" reaction. Just missing user_id.
174-
final z1 = {'emoji_name': 'zulip', 'emoji_code': 'zulip', 'reaction_type': 'zulip_extra_emoji'};
175-
176176
final user1 = eg.user(fullName: 'abc');
177177
final user2 = eg.user(fullName: 'Long Name With Many Words In It');
178178
final user3 = eg.user(fullName: 'longnamelongnamelongnamelongname');

0 commit comments

Comments
 (0)