Merge pull request #16380 from overleaf/mj-select-keyboard

[web] Allow keyboard interactions with custom select component

GitOrigin-RevId: 81adea8e456bd6ce2483dfa17a352c24c36e5768
This commit is contained in:
Mathias Jakobsen
2024-01-08 09:04:30 +00:00
committed by Copybot
parent 92f8e445d3
commit 45274d9dff
2 changed files with 28 additions and 2 deletions
@@ -266,4 +266,13 @@ describe('<Select />', function () {
})
})
})
describe('keyboard navigation', function () {
it('can select an item using the keyboard', function () {
render({ defaultText: 'Choose an item' })
cy.findByText('Choose an item').type('{Enter}{downArrow}{Enter}')
cy.findByText('Demo item 1').should('exist')
cy.findByText('Demo item 2').should('not.exist')
})
})
})