Skip to content

Commit e722ed8

Browse files
committed
test: adds code to keyboardevent
1 parent d56c516 commit e722ed8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/uui-combobox/lib/uui-combobox.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ describe('UUIComboboxElement', () => {
123123

124124
describe('keyboard navigation', () => {
125125
it('moves `active`-focus to second option on pressing the arrow down key', async () => {
126-
element.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown' }));
127-
element.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown' }));
126+
element.dispatchEvent(
127+
new KeyboardEvent('keydown', { key: 'ArrowDown', code: 'ArrowDown' }),
128+
);
129+
element.dispatchEvent(
130+
new KeyboardEvent('keydown', { key: 'ArrowDown', code: 'ArrowDown' }),
131+
);
128132

129133
await elementUpdated(element);
130134

0 commit comments

Comments
 (0)