Skip to content

Commit 0cc8367

Browse files
committed
Add test for hidden options
1 parent 749e937 commit 0cc8367

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ describe('combobox-nav', function() {
5050
<li><del>BB-8</del></li>
5151
<li id="hubot" role="option">Hubot</li>
5252
<li id="r2-d2" role="option">R2-D2</li>
53+
<li id="johnny-5" hidden role="option">Johnny 5</li>
5354
<li id="wall-e" role="option" aria-disabled="true">Wall-E</li>
5455
<li><a href="#wall-e" role="option">Wall-E</a></li>
5556
</ul>
@@ -86,10 +87,10 @@ describe('combobox-nav', function() {
8687
assert.equal(input.getAttribute('aria-activedescendant'), 'r2-d2')
8788

8889
press(input, 'ArrowDown')
89-
assert.equal(options[4].getAttribute('aria-selected'), 'true')
90+
assert.equal(options[5].getAttribute('aria-selected'), 'true')
9091
assert.equal(input.getAttribute('aria-activedescendant'), 'wall-e')
9192
press(input, 'Enter')
92-
click(options[4])
93+
click(options[5])
9394

9495
press(input, 'ArrowUp')
9596
assert.equal(options[3].getAttribute('aria-selected'), 'true')
@@ -128,7 +129,7 @@ describe('combobox-nav', function() {
128129
eventFired = true
129130
})
130131

131-
click(document.querySelectorAll('[role=option]')[4])
132+
click(document.querySelectorAll('[role=option]')[5])
132133
assert(eventFired)
133134
assert.equal(window.location.hash, '#wall-e')
134135
})

0 commit comments

Comments
 (0)