test(select): pin dropdown visual contract

变更摘要:

- 为共享 Select 补充最终视觉契约回归测试,覆盖下拉阴影和选项层级

- 保持范围收敛,仅强化 shared contract,不改生产代码

- 已运行共享测试、lint 和 build 进行回归验证

关键文件:

- web/src/shared/ui/select.test.ts
This commit is contained in:
dongmucat 2026-03-20 11:57:03 +08:00 • committed by Xudong Sun
parent 192aea6e63
commit 862328a915

View file

@ -25,6 +25,12 @@ describe('shared select contract', () => {
expect(SELECT_ITEM_CLASS_NAME).toContain('data-[disabled]:opacity-50')
})
it('keeps the dropdown and selected items visually discoverable', () => {
expect(SELECT_CONTENT_CLASS_NAME).toContain('shadow-md')
expect(SELECT_ITEM_CLASS_NAME).toContain('pl-8')
expect(SELECT_ITEM_CLASS_NAME).toContain('rounded-md')
})
it('maps empty and nullish form state to an undefined Radix value', () => {
expect(normalizeSelectValue('')).toBeUndefined()
expect(normalizeSelectValue(null)).toBeUndefined()