Skip to content

Commit d9a49d2

Browse files
committed
emoji test: Avoid coincidentally using "popular" emoji
We'll soon (for zulip#1068) be adding logic that distinguishes these emoji from other Unicode emoji. That would break some test cases which refer to an emoji that happens to be "popular", like 😄, when they really just intend the generic behavior that happens to any Unicode emoji.
1 parent be4196e commit d9a49d2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/model/emoji_test.dart

+7-7
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ void main() {
152152
final store = prepare(realmEmoji: {
153153
'1': eg.realmEmojiItem(emojiCode: '1', emojiName: 'smiley'),
154154
}, unicodeEmoji: {
155-
'1f642': ['smile'],
155+
'1f516': ['bookmark'],
156156
'1f603': ['smiley'],
157157
});
158158
check(store.allEmojiCandidates()).deepEquals([
159-
isUnicodeCandidate('1f642', ['smile']),
159+
isUnicodeCandidate('1f516', ['bookmark']),
160160
isRealmCandidate(emojiCode: '1', emojiName: 'smiley'),
161161
isZulipCandidate(),
162162
]);
@@ -207,10 +207,10 @@ void main() {
207207
]);
208208

209209
store.setServerEmojiData(ServerEmojiData(codeToNames: {
210-
'1f642': ['smile'],
210+
'1f516': ['bookmark'],
211211
}));
212212
check(store.allEmojiCandidates()).deepEquals([
213-
isUnicodeCandidate('1f642', ['smile']),
213+
isUnicodeCandidate('1f516', ['bookmark']),
214214
isZulipCandidate(),
215215
]);
216216
});
@@ -234,7 +234,7 @@ void main() {
234234
final store = prepare(realmEmoji: {
235235
'1': eg.realmEmojiItem(emojiCode: '1', emojiName: 'happy'),
236236
}, unicodeEmoji: {
237-
'1f642': ['smile'],
237+
'1f516': ['bookmark'],
238238
});
239239
final candidates = store.allEmojiCandidates();
240240
check(store.allEmojiCandidates()).identicalTo(candidates);
@@ -274,15 +274,15 @@ void main() {
274274

275275
test('results can include all three emoji types', () async {
276276
final store = prepare(
277-
realmEmoji: {'1': 'happy'}, unicodeEmoji: {'1f642': ['smile']});
277+
realmEmoji: {'1': 'happy'}, unicodeEmoji: {'1f516': ['bookmark']});
278278
final view = EmojiAutocompleteView.init(store: store,
279279
query: EmojiAutocompleteQuery(''));
280280
bool done = false;
281281
view.addListener(() { done = true; });
282282
await Future(() {});
283283
check(done).isTrue();
284284
check(view.results).deepEquals([
285-
isUnicodeResult(names: ['smile']),
285+
isUnicodeResult(names: ['bookmark']),
286286
isRealmResult(emojiName: 'happy'),
287287
isZulipResult(),
288288
]);

0 commit comments

Comments
 (0)