chore: restore wrapped chips, trim unused scopes, and complete env docs

This commit is contained in:
Justin Visser 2026-08-11 09:31:39 +02:00
parent 401a0ddea7
commit 5080e9a609
6 changed files with 74 additions and 57 deletions

View file

@ -150,14 +150,14 @@ describe('result presentation', () => {
expect(scrollIntoView).toHaveBeenCalledWith({ block: 'start' })
})
it('keeps suggestions in a labeled focusable row', () => {
it('keeps suggestions in a labeled region', () => {
const onPick = vi.fn()
const suggestions = ['Focus', 'Energy', 'Surprise']
const root = mountComponent(SuggestionChips, { suggestions, onPick })
const region = root.querySelector<HTMLElement>('[aria-label="Listening suggestions"]')
const buttons = root.querySelectorAll<HTMLButtonElement>('button')
expect(region?.tabIndex).toBe(0)
expect(region).not.toBeNull()
expect(buttons).toHaveLength(suggestions.length)
expect([...buttons].map((button) => button.textContent?.trim())).toEqual(suggestions)