mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
This commit updates the `emoji-datasource` packages to version 4.0.4.
This update brings following changes to emoji infra:
1: Fix for the bleeding sprite sheets.
2: The category of some emojis has been changed. Categorywise breakup of
net gain or loss is as follows:
Travel & Places: 58 (gain)
Symbols: 47 (loss)
Smileys & People: 52 (gain)
Objects: 11 (loss)
Food & Drink: 3 (gain)
Animals and Nature: 46 (gain)
Activities: 9 (loss)
3: There were some changes in the image farm of the package which were
breaking our old emoji farm. I fixed them by modifying the remapped
emoji map.
Fixes: #8235.
37 lines
1.5 KiB
JavaScript
37 lines
1.5 KiB
JavaScript
zrequire('emoji_codes', 'generated/emoji/emoji_codes');
|
|
zrequire('emoji');
|
|
zrequire('emoji_picker');
|
|
|
|
run_test('initialize', () => {
|
|
emoji.update_emojis({});
|
|
emoji_picker.initialize();
|
|
|
|
var complete_emoji_catalog = _.sortBy(emoji_picker.complete_emoji_catalog, 'name');
|
|
assert.equal(complete_emoji_catalog.length, 9);
|
|
assert.equal(_.keys(emoji_picker.emoji_collection).length, 1037);
|
|
|
|
function assert_emoji_category(ele, icon, num) {
|
|
assert.equal(ele.icon, icon);
|
|
assert.equal(ele.emojis.length, num);
|
|
function check_emojis(val) {
|
|
_.each(ele.emojis, function (emoji) {
|
|
assert.equal(emoji.is_realm_emoji, val);
|
|
});
|
|
}
|
|
if (ele.name === 'Custom') {
|
|
check_emojis(true);
|
|
} else {
|
|
check_emojis(false);
|
|
}
|
|
}
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-car', 177);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-hashtag', 181);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-smile-o', 260);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-thumbs-o-up', 6);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-lightbulb-o', 159);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-cutlery', 89);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-cog', 1);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-leaf', 107);
|
|
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-soccer-ball-o', 58);
|
|
});
|