From c4d804a96465dc2d00e93c963a521a71c430bf35 Mon Sep 17 00:00:00 2001 From: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:21:05 +0300 Subject: [PATCH] ImportDashboard: adjust flaky e2e test (#92705) adjust test to wait for monaco editor --- e2e/scenes/utils/flows/importDashboard.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/scenes/utils/flows/importDashboard.ts b/e2e/scenes/utils/flows/importDashboard.ts index 4e7b8ade4ad..d3c6b7e23b5 100644 --- a/e2e/scenes/utils/flows/importDashboard.ts +++ b/e2e/scenes/utils/flows/importDashboard.ts @@ -51,7 +51,9 @@ export const importDashboard = (dashboardToImport: Dashboard, queryTimeout?: num e2e.components.Panels.Panel.menu(panel.title).click({ force: true }); // force click because menu is hidden and show on hover e2e.components.Panels.Panel.menuItems('Inspect').should('be.visible').click(); e2e.components.Tab.title('JSON').should('be.visible').click(); - e2e.components.PanelInspector.Json.content().should('be.visible').contains('Panel JSON').click({ force: true }); + e2e.components.PanelInspector.Json.content().should('be.visible'); + e2e.components.ReactMonacoEditor.editorLazy().should('be.visible'); + cy.contains('Panel JSON').click({ force: true }); e2e.components.Select.option().should('be.visible').contains('Panel data').click(); // ensures that panel has loaded without knowingly hitting an error