diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts index 459c943a06e60..123c7779b091b 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts @@ -56,8 +56,9 @@ export function waitForChartLoad(chart: ChartSpec) { return ( cy // this id only becomes visible when the chart is loaded - .wrap(gridComponent) - .find(`#chart-id-${chartId}`, { timeout: 30000 }) + .get(`[data-test="chart-grid-component"] #chart-id-${chartId}`, { + timeout: 30000, + }) .should('be.visible') // return the chart grid component .then(() => gridComponent)