Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/awards_handler_spec.js')
-rw-r--r--spec/frontend/awards_handler_spec.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/frontend/awards_handler_spec.js b/spec/frontend/awards_handler_spec.js
index 5d657745615..b14bc5122b9 100644
--- a/spec/frontend/awards_handler_spec.js
+++ b/spec/frontend/awards_handler_spec.js
@@ -57,6 +57,18 @@ describe('AwardsHandler', () => {
d: 'white question mark ornament',
u: '6.0',
},
+ thumbsup: {
+ c: 'people',
+ e: '👍',
+ d: 'thumbs up sign',
+ u: '6.0',
+ },
+ thumbsdown: {
+ c: 'people',
+ e: '👎',
+ d: 'thumbs down sign',
+ u: '6.0',
+ },
};
const openAndWaitForEmojiMenu = (sel = '.js-add-award') => {
@@ -296,6 +308,23 @@ describe('AwardsHandler', () => {
awardsHandler.searchEmojis('👼');
expect($('[data-name=angel]').is(':visible')).toBe(true);
});
+
+ it('should show positive intent emoji first', async () => {
+ await openAndWaitForEmojiMenu();
+
+ awardsHandler.searchEmojis('thumb');
+
+ const $menu = $('.emoji-menu');
+ const $thumbsUpItem = $menu.find('[data-name=thumbsup]');
+ const $thumbsDownItem = $menu.find('[data-name=thumbsdown]');
+
+ expect($thumbsUpItem.is(':visible')).toBe(true);
+ expect($thumbsDownItem.is(':visible')).toBe(true);
+
+ expect($thumbsUpItem.parents('.emoji-menu-list-item').index()).toBeLessThan(
+ $thumbsDownItem.parents('.emoji-menu-list-item').index(),
+ );
+ });
});
describe('emoji menu', () => {