diff --git a/web-common/src/components/virtualized-table/core/Cell.svelte b/web-common/src/components/virtualized-table/core/Cell.svelte index e2812dcfe9b..1a894893830 100644 --- a/web-common/src/components/virtualized-table/core/Cell.svelte +++ b/web-common/src/components/virtualized-table/core/Cell.svelte @@ -177,7 +177,11 @@ - +
diff --git a/web-local/tests/explores/annotations.spec.ts b/web-local/tests/explores/annotations.spec.ts index 53a8040d525..8e7b45c1855 100644 --- a/web-local/tests/explores/annotations.spec.ts +++ b/web-local/tests/explores/annotations.spec.ts @@ -138,14 +138,29 @@ function expectedDates( return new Set(dates); } +async function waitForTotalRecordsButton(page: Page, timeoutMs = 20_000) { + await expect( + page.getByRole("button", { name: /Total records/ }).first(), + ).toBeVisible({ timeout: timeoutMs }); +} + +async function waitForTotalRecordsButtonWithSingleReload(page: Page) { + // This setup is occasionally flaky in CI due transient runtime connection + // issues. Reload once before failing to avoid a false-negative. + try { + await waitForTotalRecordsButton(page); + } catch { + await page.reload(); + await waitForTotalRecordsButton(page); + } +} + async function setupDashboard(page: Page, dashboardTZ: string) { await page.getByLabel("/dashboards").click(); await gotoNavEntry(page, "/dashboards/AdBids_metrics_explore.yaml"); // Wait for the base project to finish reconciling - await expect( - page.getByRole("button", { name: /Total records/ }).first(), - ).toBeVisible({ timeout: 30_000 }); + await waitForTotalRecordsButtonWithSingleReload(page); // Write annotation files while still in the editor view. This triggers // re-reconciliation in the background. @@ -159,10 +174,7 @@ async function setupDashboard(page: Page, dashboardTZ: string) { const base = new URL(page.url()).origin; const exploreUrl = `${base}/explore/AdBids_metrics_explore?tz=${encodeURIComponent(dashboardTZ)}`; await page.goto(exploreUrl); - - await expect( - page.getByRole("button", { name: /Total records/ }).first(), - ).toBeVisible({ timeout: 30_000 }); + await waitForTotalRecordsButtonWithSingleReload(page); // Wait for annotation query responses to arrive and the chart to // finish re-rendering. Without this, menu interactions race against