test(web): wait for command palette focus before pasting (#43236)

This commit is contained in:
yyh
2026-09-29 12:24:09 +00:00
committed by GitHub
parent 0ed392fb62
commit a4f949f173

View File

@@ -497,8 +497,10 @@ describe('GotoAnything', () => {
]
renderGotoAnything(<GotoAnything />)
triggerSearchShortcut()
await screen.findByRole('combobox')
const input = await screen.findByRole('combobox')
await waitFor(() => expect(input).toHaveFocus())
await user.paste('models')
expect(input).toHaveValue('models')
expect(screen.getByRole('option', { name: /\/models/ })).toBeInTheDocument()
await user.keyboard('{Enter}')
expect(execute).toHaveBeenCalledTimes(1)