Feature 11: Settings home and Admin AI assistant (#86)
CI / ci (push) Successful in 2m0s

Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #86.
This commit is contained in:
2026-10-06 12:45:05 -04:00
committed by approver_agent
parent f25b28b39b
commit fcbdebd6e8
54 changed files with 6712 additions and 89 deletions
+38
View File
@@ -0,0 +1,38 @@
import { fireEvent, render, screen } from '@testing-library/react'
import { describe, expect, it, vi } from 'vitest'
import { expectMinHitArea } from '../test/hitArea.ts'
import { Select } from './Select.tsx'
describe('Select', () => {
it('is a native select named by its label', () => {
const onChange = vi.fn()
render(
<Select label="Provider" value="a" onChange={onChange}>
<option value="a">Alpha</option>
<option value="b">Beta</option>
</Select>,
)
const select = screen.getByRole('combobox', { name: 'Provider' })
expect(select).toHaveValue('a')
fireEvent.change(select, { target: { value: 'b' } })
expect(onChange).toHaveBeenCalledOnce()
})
it('keeps a 44 px tap target', () => {
render(
<Select label="Model" defaultValue="a">
<option value="a">Alpha</option>
</Select>,
)
expectMinHitArea(screen.getByRole('combobox', { name: 'Model' }))
})
it('hides its chevron from assistive technology', () => {
const { container } = render(
<Select label="Model" defaultValue="a">
<option value="a">Alpha</option>
</Select>,
)
expect(container.querySelector('svg')).toHaveAttribute('aria-hidden', 'true')
})
})