The emoji menu should not close when the search box is clicked

This commit is contained in:
Jared Deckard 2018-02-06 15:36:49 -06:00
parent ba62493009
commit 3647fe58c1
1 changed files with 12 additions and 1 deletions

View File

@ -79,7 +79,7 @@ import '~/lib/utils/common_utils';
return expect($emojiMenu.length).toBe(1);
});
});
return it('should remove emoji menu when body is clicked', function(done) {
it('should remove emoji menu when body is clicked', function(done) {
$('.js-add-award').eq(0).click();
return lazyAssert(done, function() {
var $emojiMenu;
@ -90,6 +90,17 @@ import '~/lib/utils/common_utils';
return expect($('.js-awards-block.current').length).toBe(0);
});
});
it('should not remove emoji menu when search is clicked', function(done) {
$('.js-add-award').eq(0).click();
return lazyAssert(done, function() {
var $emojiMenu;
$emojiMenu = $('.emoji-menu');
$('.emoji-search').click();
expect($emojiMenu.length).toBe(1);
expect($emojiMenu.hasClass('is-visible')).toBe(true);
return expect($('.js-awards-block.current').length).toBe(1);
});
});
});
describe('::addAwardToEmojiBar', function() {
it('should add emoji to votes block', function() {