test(web): wait for command palette focus before pasting (#43236)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user