Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 4707602

Browse files
Foxandxsswesleycho
authored andcommitted
chore(accordion): test that any other keyCode wont work
Closes #4399
1 parent 2528371 commit 4707602

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/accordion/test/accordion.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@ describe('uib-accordion', function() {
240240

241241
expect(group).not.toHaveClass('panel-open');
242242
});
243+
244+
it('should not toggle with any other keyCode', function() {
245+
var group = groups.eq(0);
246+
findGroupLink(0)[0].focus();
247+
var e = $.Event('keypress');
248+
e.which = 65;
249+
findGroupLink(0).trigger(e);
250+
251+
expect(group).not.toHaveClass('panel-open');
252+
});
243253
});
244254

245255
describe('with open-class attribute', function() {

0 commit comments

Comments
 (0)