Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed unstable requests regression test #8841

Merged
merged 11 commits into from
Dec 19, 2024
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 = () => {
Copy link
Contributor

@Marishka17 Marishka17 Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we use closeNotification custom command?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using default command for two reasons:

  1. It expects notification to have specific class (curretly notifications related to requests dont have specific assigned classes)
  2. Even if we add the classes, this test has a bit unique scenario as two notifications are expected. The command will fail as it expects that no notifications with provided class are present after closing operation.

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
Loading