From c4504dc013027128d8ca60115072ecc4fa0c565c Mon Sep 17 00:00:00 2001 From: Kirill Lakhov Date: Thu, 19 Dec 2024 14:40:51 +0300 Subject: [PATCH] Fixed unstable requests regression test (#8841) The regression test fails from time to time because notification of successful export is not closed. Probably because we use the contains command which selects the same element twice --- tests/cypress/e2e/features/requests_page.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/cypress/e2e/features/requests_page.js b/tests/cypress/e2e/features/requests_page.js index 8622092b89d8..f78554986356 100644 --- a/tests/cypress/e2e/features/requests_page.js +++ b/tests/cypress/e2e/features/requests_page.js @@ -322,9 +322,11 @@ context('Requests page', () => { cy.getJobIDFromIdx(0).then((jobID) => { const closeExportNotification = () => { - cy.contains('Export is finished').should('be.visible'); - cy.contains('Export is finished').parents('.ant-notification-notice') - .find('span[aria-label="close"]').click(); + cy.get('.ant-notification-notice').first().within((notification) => { + cy.contains('Export is finished').should('be.visible'); + cy.get('span[aria-label="close"]').click(); + cy.wrap(notification).should('not.exist'); + }); }; const exportParams = {