This commit is contained in:
Stephen Zhou
2026-03-25 19:25:22 +08:00
parent f0041ec619
commit a7178b4d5c
40 changed files with 652 additions and 156 deletions

View File

@ -264,7 +264,7 @@ describe('UrlInput', () => {
render(<UrlInput {...props} />)
const input = screen.getByRole('textbox')
await userEvent.type(input, longUrl)
fireEvent.change(input, { target: { value: longUrl } })
expect(input).toHaveValue(longUrl)
})
@ -275,7 +275,7 @@ describe('UrlInput', () => {
render(<UrlInput {...props} />)
const input = screen.getByRole('textbox')
await userEvent.type(input, unicodeUrl)
fireEvent.change(input, { target: { value: unicodeUrl } })
expect(input).toHaveValue(unicodeUrl)
})
@ -285,7 +285,10 @@ describe('UrlInput', () => {
render(<UrlInput {...props} />)
const input = screen.getByRole('textbox')
await userEvent.type(input, 'https://rapid.com', { delay: 1 })
fireEvent.change(input, { target: { value: 'h' } })
fireEvent.change(input, { target: { value: 'ht' } })
fireEvent.change(input, { target: { value: 'https://' } })
fireEvent.change(input, { target: { value: 'https://rapid.com' } })
expect(input).toHaveValue('https://rapid.com')
})