Skip to content

Commit 29be6a0

Browse files
committed
Increase coverage. Provide test when a key is pressed and is focused
1 parent 0a15f47 commit 29be6a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/keyboard.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ describe('keyboard', function() {
1414
select.selectric();
1515
});
1616

17+
it('should open if has focus', function() {
18+
$('.selectric-input').focus();
19+
$('.selectric-items').find('li').click();
20+
var inputElm = document.activeElement;
21+
keyvent.on(inputElm).down('down');
22+
expect($('.selectric-items').is(':visible')).toBe(true);
23+
});
24+
1725
it('should close on tab keypress', function() {
1826
$('.selectric').click();
1927
var inputElm = document.activeElement;

0 commit comments

Comments
 (0)