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'); }); });