enhance: add comprehensive unit tests PR223

This commit is contained in:
Wendong-Fan 2025-09-06 06:17:32 +08:00
parent 1917d599e6
commit 7e72e6b115
6 changed files with 80 additions and 44 deletions

View file

@ -359,10 +359,9 @@ describe('SearchInput Component', () => {
await user.keyboard('{Escape}')
// Escape should blur the input in typical environments; accept either focused or not
// (some test environments may not simulate key blur reliably)
const focused = document.activeElement === input
expect([true, false]).toContain(focused)
// Component doesn't implement Escape key handling, so focus remains
// This is expected behavior for a simple search input
expect(input).toHaveFocus()
})
})