Skip to content

Commit

Permalink
Added regression test for requests page (#8608)
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov authored Oct 30, 2024
1 parent bce96ea commit 4d4d8fc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions tests/cypress/e2e/features/requests_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,5 +357,24 @@ context('Requests page', () => {
});
});
});

it('Export task. Request for status fails, UI is not crushing', () => {
cy.intercept('GET', '/api/requests/**', {
statusCode: 500,
body: 'Network error',
});

cy.exportTask({
type: 'annotations',
format: exportFormat,
archiveCustomName: annotationsArchiveNameLocal,
});

cy.contains('Could not export dataset').should('be.visible');
cy.closeNotification('.ant-notification-notice-error');

cy.contains('.cvat-header-button', 'Requests').should('be.visible').click();
cy.get('.cvat-requests-page').should('be.visible');
});
});
});
2 changes: 1 addition & 1 deletion tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ Cypress.Commands.add('exportTask', ({
cy.get('.cvat-cloud-storage-select-provider').click();
}
}
cy.contains('button', 'OK').click();
cy.contains('.cvat-modal-export-task button', 'OK').click();
cy.get('.cvat-notification-notice-export-task-start').should('be.visible');
cy.closeNotification('.cvat-notification-notice-export-task-start');
});
Expand Down

0 comments on commit 4d4d8fc

Please sign in to comment.