mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 19:34:38 +00:00
fix(webui): fix select field height and multi-select overflow/interaction issues (#307)
* fix(webui): standardize single-select custom field height * fix(webui): fix multi-select badge overflow calculation and simplify direct edit
This commit is contained in:
@@ -45,8 +45,21 @@ describe('SelectField Component', () => {
|
||||
}
|
||||
|
||||
it('renders selected option badge correctly', () => {
|
||||
render(<SelectField value="foo" config={sampleConfig} onSave={vi.fn()} />)
|
||||
expect(screen.getByText('Foo')).toBeTruthy()
|
||||
const { container } = render(<SelectField value="foo" config={sampleConfig} onSave={vi.fn()} />)
|
||||
const badge = screen.getByText('Foo')
|
||||
expect(badge).toBeTruthy()
|
||||
expect(badge.className).toContain('h-[22px]')
|
||||
const trigger = container.querySelector('div[class*="h-[28px]"]')
|
||||
expect(trigger).toBeTruthy()
|
||||
})
|
||||
|
||||
it('renders placeholder with text-sm styling', () => {
|
||||
const { container } = render(<SelectField value="" config={sampleConfig} onSave={vi.fn()} />)
|
||||
const placeholder = screen.getByText('Select an option')
|
||||
expect(placeholder).toBeTruthy()
|
||||
expect(placeholder.className).toContain('text-sm')
|
||||
const trigger = container.querySelector('div[class*="h-[28px]"]')
|
||||
expect(trigger).toBeTruthy()
|
||||
})
|
||||
|
||||
it('filters options based on search query', () => {
|
||||
|
||||
Reference in New Issue
Block a user