diff --git a/ui/src/pages/tools/McpConfigHelpDialog.test.tsx b/ui/src/pages/tools/McpConfigHelpDialog.test.tsx index c6149921ca9..ee061ea94c5 100644 --- a/ui/src/pages/tools/McpConfigHelpDialog.test.tsx +++ b/ui/src/pages/tools/McpConfigHelpDialog.test.tsx @@ -149,7 +149,9 @@ describe("Paste a config — MCP config help", () => { await flushReact(); await flushReact(); - expect(document.body.textContent).toContain("select the text above and copy it"); + await vi.waitFor(() => { + expect(document.body.textContent).toContain("select the text above and copy it"); + }); }); it("makes no connection or import request when opened or copied", async () => {