From 1fb19852a8ba14fdae70fab85d01fd9b9c33e5f2 Mon Sep 17 00:00:00 2001 From: Kavitha Conjeevaram Mohan Date: Fri, 24 Feb 2023 13:53:01 -0800 Subject: [PATCH 1/3] Change to toast message in Reports download spec Signed-off-by: Kavitha Conjeevaram Mohan --- .../plugins/reports-dashboards/04-download.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 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..fa5d1ed9e 100644 --- a/cypress/integration/plugins/reports-dashboards/04-download.spec.js +++ b/cypress/integration/plugins/reports-dashboards/04-download.spec.js @@ -41,7 +41,7 @@ describe('Cypress', () => { .contains('PDF') .click({ force: true }); cy.get('body').then(($body) => { - if ($body.find('#downloadInProgressLoadingModal').length > 0) { + if (cy.get('.euiToastHeader__title').contains('Successfully generated report').should('exist')) { return; } else { assert(false); @@ -137,6 +137,6 @@ describe('Cypress', () => { cy.get('#generateReportFromDetailsFileFormat').click({ force: true }); - cy.get('#downloadInProgressLoadingModal'); + cy.get('.euiToastHeader__title').contains('Successfully generated report').should('exist'); }); }); From 8b9b01b176ab1ac24c84dc236a11c42bb81f6c68 Mon Sep 17 00:00:00 2001 From: Kavitha Conjeevaram Mohan Date: Tue, 28 Feb 2023 10:46:50 -0800 Subject: [PATCH 2/3] Update test Signed-off-by: Kavitha Conjeevaram Mohan --- .../plugins/reports-dashboards/04-download.spec.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cypress/integration/plugins/reports-dashboards/04-download.spec.js b/cypress/integration/plugins/reports-dashboards/04-download.spec.js index fa5d1ed9e..aad3dbdaf 100644 --- a/cypress/integration/plugins/reports-dashboards/04-download.spec.js +++ b/cypress/integration/plugins/reports-dashboards/04-download.spec.js @@ -40,13 +40,7 @@ describe('Cypress', () => { cy.get('[id="landingPageOnDemandDownload"]') .contains('PDF') .click({ force: true }); - cy.get('body').then(($body) => { - if (cy.get('.euiToastHeader__title').contains('Successfully generated report').should('exist')) { - return; - } else { - assert(false); - } - }); + cy.get('.euiToastHeader__title').contains('Successfully generated report').should('exist'); }); it('Download pdf from in-context menu', () => { From ddc1cd8dbc1033324d341aed977e47ef1231f944 Mon Sep 17 00:00:00 2001 From: Kavitha Conjeevaram Mohan Date: Tue, 29 Aug 2023 14:43:20 -0700 Subject: [PATCH 3/3] Fix lint Signed-off-by: Kavitha Conjeevaram Mohan --- .../plugins/reports-dashboards/04-download.spec.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cypress/integration/plugins/reports-dashboards/04-download.spec.js b/cypress/integration/plugins/reports-dashboards/04-download.spec.js index aad3dbdaf..ff2d0c60b 100644 --- a/cypress/integration/plugins/reports-dashboards/04-download.spec.js +++ b/cypress/integration/plugins/reports-dashboards/04-download.spec.js @@ -40,7 +40,9 @@ describe('Cypress', () => { cy.get('[id="landingPageOnDemandDownload"]') .contains('PDF') .click({ force: true }); - cy.get('.euiToastHeader__title').contains('Successfully generated report').should('exist'); + cy.get('.euiToastHeader__title') + .contains('Successfully generated report') + .should('exist'); }); it('Download pdf from in-context menu', () => { @@ -131,6 +133,8 @@ describe('Cypress', () => { cy.get('#generateReportFromDetailsFileFormat').click({ force: true }); - cy.get('.euiToastHeader__title').contains('Successfully generated report').should('exist'); + cy.get('.euiToastHeader__title') + .contains('Successfully generated report') + .should('exist'); }); });