: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(insights): retry drag-to-zoom gesture until chart is interactive (#70209)
Paul D'Ambrabade7c90ec06
diff --git a/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsx b/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsxindex d17d2877e388..67a5e36dd5dc 100644--- a/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsx+++ b/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart.test.tsx@@ -176,9 +176,12 @@ describe('TrendsLifecycleChart', () => {})const canvas = await screen.findByLabelText(/chart with/i)- dragSelection(canvas.parentElement!, 1, 3, LIFECYCLE_LABELS.length)+ // The chart commits its interactive scales/dimensions in a post-render effect+ // (useChartCanvas) after the labeled canvas mounts, so a drag fired immediately+ // can be silently dropped. Retry it (like hoverUntilTooltip) until it lands.await waitFor(() => {+ dragSelection(canvas.parentElement!, 1, 3, LIFECYCLE_LABELS.length)expect(onDateRangeZoom).toHaveBeenCalledWith('2024-06-11', '2024-06-13')})})