Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(posthog-ai): stabilize lazy tool registry test (#99209)

Paul D'Ambra99dde0bc1b11
diff --git a/products/posthog_ai/frontend/components/tool/toolRegistry.test.tsx b/products/posthog_ai/frontend/components/tool/toolRegistry.test.tsx
index 2bb85d3270e7..8179f13e3803 100644
--- a/products/posthog_ai/frontend/components/tool/toolRegistry.test.tsx
+++ b/products/posthog_ai/frontend/components/tool/toolRegistry.test.tsx
@@ -151,7 +151,7 @@ describe('toolRegistry', () => {
/>
)
expect(screen.getByText('Notebook')).toBeInTheDocument()
- expect(await screen.findByText('Synthetic notebook')).toBeInTheDocument()
+ expect(await screen.findByText('Synthetic notebook', {}, { timeout: 10000 })).toBeInTheDocument()
expect(screen.queryByText('Notebook')).not.toBeInTheDocument()
expect(require.cache[require.resolve('./widgets/CreateNotebookWidget')]).not.toBeUndefined()
})