From 68bc9ee76f872162a85459a29d849e0b6533e906 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Thu, 25 Jul 2024 13:21:32 +0200 Subject: [PATCH] chore: break up chain and wait --- cypress/e2e/dashboard_filter/create_dashboard.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/dashboard_filter/create_dashboard.js b/cypress/e2e/dashboard_filter/create_dashboard.js index 038258ca2..59ac46659 100644 --- a/cypress/e2e/dashboard_filter/create_dashboard.js +++ b/cypress/e2e/dashboard_filter/create_dashboard.js @@ -93,16 +93,16 @@ Then( .should('be.visible') .and('contain', TEST_DASHBOARD_TITLE) // check for a map canvas and a highcharts element - cy.get(`${gridItemSel}.VISUALIZATION`) - .getIframeBody() - .find(chartSel, EXTENDED_TIMEOUT) - .as('chart') + cy.get(`${gridItemSel}.VISUALIZATION`).getIframeBody().as('iframe') + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(5000) + cy.get('@iframe').find(chartSel).as('chart') cy.get('@chart').should('be.visible') - cy.get(`${gridItemSel}.MAP`) - .getIframeBody() - .find(mapSel, EXTENDED_TIMEOUT) - .as('map') + cy.get(`${gridItemSel}.MAP`).getIframeBody().as('ifram2') + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(5000) + cy.get('@iframe2').find(mapSel).as('map') cy.get('@map').should('be.visible').should('be.visible') } )