From db1d598f50f56f0aa8bf0a277b4c889a9b772ab6 Mon Sep 17 00:00:00 2001 From: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com> Date: Fri, 26 Mar 2021 14:46:31 -0700 Subject: [PATCH] fix(cypress): avoid referencing detached dom nodes (#13825) --- .../cypress/integration/dashboard/dashboard.helper.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 459c943a0..123c7779b 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)