Skip to content

Commit 3dfa297

Browse files
committed
test: add select-combobox test
1 parent 1ee3e7a commit 3dfa297

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/__tests__/element-queries.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,11 @@ test('queryAllByRole returns semantic html elements', () => {
414414
<table role="grid"></table>
415415
<div role="meter progressbar" />
416416
<button>Button</button>
417+
<select><option value="1">one</option></select>
418+
<select size="2">
419+
<option value="1">one</option>
420+
<option value="2">two</option>
421+
</select>
417422
</form>
418423
`)
419424

@@ -437,6 +442,8 @@ test('queryAllByRole returns semantic html elements', () => {
437442
expect(queryAllByRole('meter')).toHaveLength(1)
438443
expect(queryAllByRole('progressbar')).toHaveLength(0)
439444
expect(queryAllByRole('progressbar', {queryFallbacks: true})).toHaveLength(1)
445+
expect(queryAllByRole('combobox')).toHaveLength(2)
446+
expect(queryAllByRole('listbox')).toHaveLength(2)
440447
})
441448

442449
test('getAll* matchers return an array', () => {

0 commit comments

Comments
 (0)