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(playwright): target the chart canvas in the sql axis labels spec (#125222)

Nick Best2c68e84f80f5
diff --git a/playwright/e2e/sql-editor-axis-labels.spec.ts b/playwright/e2e/sql-editor-axis-labels.spec.ts
index 37a62f2bc389..7f871e0d77fe 100644
--- a/playwright/e2e/sql-editor-axis-labels.spec.ts
+++ b/playwright/e2e/sql-editor-axis-labels.spec.ts
@@ -7,7 +7,7 @@ import { expect, test, PlaywrightWorkspaceSetupResult } from '../utils/workspace
async function goToSavedSqlInsight(page: Page, insightShortId: InsightShortId): Promise<void> {
await page.goto(`/sql#insight=${insightShortId}`, { waitUntil: 'domcontentloaded' })
await expect(page).toHaveURL(/\/sql#.*insight=/)
- await expect(page.locator('.DataVisualization canvas').last()).toBeVisible({ timeout: 60_000 })
+ await expect(page.locator('.DataVisualization canvas[role="img"]').last()).toBeVisible({ timeout: 60_000 })
await expect(page.getByRole('button', { name: 'Update insight' })).toBeVisible({ timeout: 30_000 })
}