Skip to content

Commit bb2e5f2

Browse files
committed
Fix QuickNavigationModal.spec.js
1 parent c9ceeaa commit bb2e5f2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/unit/components/Navigator/QuickNavigationModal.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ describe('QuickNavigationModal', () => {
244244
it('adds tabindex="0" when reference index is equal to focusedIndex', async () => {
245245
await wrapper.setData({
246246
debouncedInput: inputValue,
247+
focusedIndex: 0,
248+
});
249+
expect(wrapper.findAllComponents({ ref: 'match' }).at(0).attributes('tabindex')).toBe('0');
250+
expect(wrapper.findAllComponents({ ref: 'match' }).at(1).attributes('tabindex')).toBe('-1');
251+
await wrapper.setData({
247252
focusedIndex: 1,
248253
});
249254
expect(wrapper.findAllComponents({ ref: 'match' }).at(0).attributes('tabindex')).toBe('-1');

0 commit comments

Comments
 (0)