From 4d4d8fc0ff618eecf18ed2f9406eceb5f94f321c Mon Sep 17 00:00:00 2001 From: Kirill Lakhov Date: Wed, 30 Oct 2024 13:03:53 +0300 Subject: [PATCH] Added regression test for requests page (#8608) --- tests/cypress/e2e/features/requests_page.js | 19 +++++++++++++++++++ tests/cypress/support/commands.js | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/cypress/e2e/features/requests_page.js b/tests/cypress/e2e/features/requests_page.js index 3cdf187a982..8622092b89d 100644 --- a/tests/cypress/e2e/features/requests_page.js +++ b/tests/cypress/e2e/features/requests_page.js @@ -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'); + }); }); }); diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 76f7ffe2640..91322e9c369 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -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'); });