From 3d261a37121dac5287caf70528e0509dee0a7dc4 Mon Sep 17 00:00:00 2001 From: Kavitha Conjeevaram Mohan Date: Wed, 30 Aug 2023 12:44:09 -0700 Subject: [PATCH] Change to toast message in Reports (#578) * Change to toast message in Reports download spec Signed-off-by: Kavitha Conjeevaram Mohan * Update test Signed-off-by: Kavitha Conjeevaram Mohan * Fix lint Signed-off-by: Kavitha Conjeevaram Mohan --------- Signed-off-by: Kavitha Conjeevaram Mohan (cherry picked from commit 46c9a48875007d6c7a06a2fe46abfd7f68a42e7e) --- .../plugins/reports-dashboards/04-download.spec.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cypress/integration/plugins/reports-dashboards/04-download.spec.js b/cypress/integration/plugins/reports-dashboards/04-download.spec.js index 381fb6ce9..ff2d0c60b 100644 --- a/cypress/integration/plugins/reports-dashboards/04-download.spec.js +++ b/cypress/integration/plugins/reports-dashboards/04-download.spec.js @@ -40,13 +40,9 @@ describe('Cypress', () => { cy.get('[id="landingPageOnDemandDownload"]') .contains('PDF') .click({ force: true }); - cy.get('body').then(($body) => { - if ($body.find('#downloadInProgressLoadingModal').length > 0) { - return; - } else { - assert(false); - } - }); + cy.get('.euiToastHeader__title') + .contains('Successfully generated report') + .should('exist'); }); it('Download pdf from in-context menu', () => { @@ -137,6 +133,8 @@ describe('Cypress', () => { cy.get('#generateReportFromDetailsFileFormat').click({ force: true }); - cy.get('#downloadInProgressLoadingModal'); + cy.get('.euiToastHeader__title') + .contains('Successfully generated report') + .should('exist'); }); });