From 85229cc7f4286295e87dae3435b210c94efc9e98 Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Thu, 20 Feb 2025 16:00:35 -0800 Subject: [PATCH] Updated flakey test from reporting homepage Signed-off-by: sumukhswamy --- .../plugins/reports-dashboards/04-download.spec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cypress/integration/plugins/reports-dashboards/04-download.spec.js b/cypress/integration/plugins/reports-dashboards/04-download.spec.js index ff2d0c60b..b87396d89 100644 --- a/cypress/integration/plugins/reports-dashboards/04-download.spec.js +++ b/cypress/integration/plugins/reports-dashboards/04-download.spec.js @@ -31,6 +31,8 @@ describe('Cypress', () => { cy.visit(`${BASE_PATH}/app/reports-dashboards#/`, { waitForGetTenant: true, }); + cy.intercept('GET', '/_dashboards/api/reporting/generateReport/*').as('generateReport'); + cy.location('pathname', { timeout: TIMEOUT }).should( 'include', '/reports-dashboards' @@ -40,9 +42,8 @@ describe('Cypress', () => { cy.get('[id="landingPageOnDemandDownload"]') .contains('PDF') .click({ force: true }); - cy.get('.euiToastHeader__title') - .contains('Successfully generated report') - .should('exist'); + cy.wait('@generateReport').its('response.statusCode').should('eq', 200); + }); it('Download pdf from in-context menu', () => {