fix(cypress): avoid referencing detached dom nodes (#13825)

This commit is contained in:
David Aaron Suddjian 2021-03-26 14:46:31 -07:00 committed by GitHub
parent a45a5e1060
commit db1d598f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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)