Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

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

yyha4f949f17371
diff --git a/web/app/components/goto-anything/__tests__/index.spec.tsx b/web/app/components/goto-anything/__tests__/index.spec.tsx
index 20d915d7ac3..0cc981ecdb4 100644
--- a/web/app/components/goto-anything/__tests__/index.spec.tsx
+++ b/web/app/components/goto-anything/__tests__/index.spec.tsx
@@ -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)