未验证 提交 8b719e49 编写于 作者: K Kirill Lakhov 提交者: GitHub

Fixed unstable e2e restore tests (#5010)

上级 ddcee5b3
...@@ -28,6 +28,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428) ...@@ -28,6 +28,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428)
(<https://github.com/openvinotoolkit/cvat/pull/4659>) (<https://github.com/openvinotoolkit/cvat/pull/4659>)
- Project import/export with skeletons (<https://github.com/opencv/cvat/pull/4867>, - Project import/export with skeletons (<https://github.com/opencv/cvat/pull/4867>,
<https://github.com/opencv/cvat/pull/5004>) <https://github.com/opencv/cvat/pull/5004>)
- Unstable e2e restore tests (<https://github.com/opencv/cvat/pull/5010>)
### Security ### Security
- TDB - TDB
......
...@@ -113,8 +113,12 @@ context('Export, import an annotation task.', { browser: '!firefox' }, () => { ...@@ -113,8 +113,12 @@ context('Export, import an annotation task.', { browser: '!firefox' }, () => {
cy.wait('@importTask').its('response.statusCode').should('equal', 201); cy.wait('@importTask').its('response.statusCode').should('equal', 201);
cy.wait('@importTask').its('response.statusCode').should('equal', 204); cy.wait('@importTask').its('response.statusCode').should('equal', 204);
cy.wait('@importTask').its('response.statusCode').should('equal', 202); cy.wait('@importTask').its('response.statusCode').should('equal', 202);
cy.wait('@importTask', { timeout: 5000 }).its('response.statusCode').should('equal', 202); cy.wait('@importTask').then((interception) => {
cy.wait('@importTask').its('response.statusCode').should('equal', 201); cy.wrap(interception).its('response.statusCode').should('be.oneOf', [201, 202]);
if (interception.response.statusCode === 202) {
cy.wait('@importTask').its('response.statusCode').should('equal', 201);
}
});
cy.contains('The task has been restored succesfully. Click here to open').should('exist').and('be.visible'); cy.contains('The task has been restored succesfully. Click here to open').should('exist').and('be.visible');
cy.closeNotification('.ant-notification-notice-info'); cy.closeNotification('.ant-notification-notice-info');
cy.openTask(taskName); cy.openTask(taskName);
......
...@@ -213,13 +213,15 @@ Cypress.Commands.add('restoreProject', (archiveWithBackup, sourceStorage = null) ...@@ -213,13 +213,15 @@ Cypress.Commands.add('restoreProject', (archiveWithBackup, sourceStorage = null)
cy.wait('@restoreProject').its('response.statusCode').should('equal', 201); cy.wait('@restoreProject').its('response.statusCode').should('equal', 201);
cy.wait('@restoreProject').its('response.statusCode').should('equal', 204); cy.wait('@restoreProject').its('response.statusCode').should('equal', 204);
cy.wait('@restoreProject').its('response.statusCode').should('equal', 202); cy.wait('@restoreProject').its('response.statusCode').should('equal', 202);
cy.wait('@restoreProject', { timeout: 5000 }).its('response.statusCode').should('equal', 202);
cy.wait('@restoreProject').its('response.statusCode').should('equal', 201);
} else { } else {
cy.wait('@restoreProject').its('response.statusCode').should('equal', 202); cy.wait('@restoreProject').its('response.statusCode').should('equal', 202);
cy.wait('@restoreProject', { timeout: 3000 }).its('response.statusCode').should('equal', 202);
cy.wait('@restoreProject').its('response.statusCode').should('equal', 201);
} }
cy.wait('@restoreProject').then((interception) => {
cy.wrap(interception).its('response.statusCode').should('be.oneOf', [201, 202]);
if (interception.response.statusCode === 202) {
cy.wait('@restoreProject').its('response.statusCode').should('equal', 201);
}
});
cy.contains('The project has been restored succesfully. Click here to open') cy.contains('The project has been restored succesfully. Click here to open')
.should('exist') .should('exist')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册