Skip to content

Commit

Permalink
Fixed unstable requests regression test (#8841)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
klakhov authored Dec 19, 2024
1 parent 5140d3d commit c4504dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/cypress/e2e/features/requests_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit c4504dc

Please sign in to comment.