diff --git a/src/components/dropdown/dropdown.test.ts b/src/components/dropdown/dropdown.test.ts index 205986b90..e97671539 100644 --- a/src/components/dropdown/dropdown.test.ts +++ b/src/components/dropdown/dropdown.test.ts @@ -179,6 +179,27 @@ describe('', () => { expect(el.open).to.be.true; }); + it('should navigate to first focusable item on arrow navigation', async () => { + const el = await fixture(html` + + Toggle + + Top Label + Item 1 + + + `); + const trigger = el.querySelector('sl-button')!; + const item = el.querySelector('sl-menu-item')!; + + trigger.focus(); + await sendKeys({ press: 'ArrowDown' }); + await el.updateComplete; + const itemFocused = document.activeElement === item; + + expect(itemFocused).to.be.true; + }); + it('should close on escape key', async () => { const el = await fixture(html`