Skip to content

Commit 327efa2

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 0292bdf commit 327efa2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/model/emoji_test.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ void main() {
127127
final store = prepare(realmEmoji: {
128128
'1': eg.realmEmojiItem(emojiCode: '1', emojiName: 'smiley'),
129129
}, unicodeEmoji: {
130-
'1f642': ['smile'],
130+
'1f516': ['bookmark'],
131131
'1f603': ['smiley'],
132132
});
133133
check(store.allEmojiCandidates()).deepEquals([
134-
isUnicodeCandidate('1f642', ['smile']),
134+
isUnicodeCandidate('1f516', ['bookmark']),
135135
isRealmCandidate(emojiCode: '1', emojiName: 'smiley'),
136136
isZulipCandidate(),
137137
]);
@@ -170,10 +170,10 @@ void main() {
170170
]);
171171

172172
store.setServerEmojiData(ServerEmojiData(codeToNames: {
173-
'1f642': ['smile'],
173+
'1f516': ['bookmark'],
174174
}));
175175
check(store.allEmojiCandidates()).deepEquals([
176-
isUnicodeCandidate('1f642', ['smile']),
176+
isUnicodeCandidate('1f516', ['bookmark']),
177177
isZulipCandidate(),
178178
]);
179179
});
@@ -197,7 +197,7 @@ void main() {
197197
final store = prepare(realmEmoji: {
198198
'1': eg.realmEmojiItem(emojiCode: '1', emojiName: 'happy'),
199199
}, unicodeEmoji: {
200-
'1f642': ['smile'],
200+
'1f516': ['bookmark'],
201201
});
202202
final candidates = store.allEmojiCandidates();
203203
check(store.allEmojiCandidates()).identicalTo(candidates);
@@ -237,15 +237,15 @@ void main() {
237237

238238
test('results can include all three emoji types', () async {
239239
final store = prepare(
240-
realmEmoji: {'1': 'happy'}, unicodeEmoji: {'1f642': ['smile']});
240+
realmEmoji: {'1': 'happy'}, unicodeEmoji: {'1f516': ['bookmark']});
241241
final view = EmojiAutocompleteView.init(store: store,
242242
query: EmojiAutocompleteQuery(''));
243243
bool done = false;
244244
view.addListener(() { done = true; });
245245
await Future(() {});
246246
check(done).isTrue();
247247
check(view.results).deepEquals([
248-
isUnicodeResult(names: ['smile']),
248+
isUnicodeResult(names: ['bookmark']),
249249
isRealmResult(emojiName: 'happy'),
250250
isZulipResult(),
251251
]);

0 commit comments

Comments
 (0)