From 5e0bdea87a89e6c05b5713b6d613e8233c28f025 Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Mon, 1 Feb 2021 10:04:09 +0300 Subject: [PATCH] Cypress test. Export as a dataset. (#2724) --- .../case_47_export_dataset.js | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js diff --git a/tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js b/tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js new file mode 100644 index 00000000..c2fff01e --- /dev/null +++ b/tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js @@ -0,0 +1,43 @@ +// Copyright (C) 2021 Intel Corporation +// +// SPDX-License-Identifier: MIT + +/// + +import { taskName, labelName } from '../../support/const'; + +context('Export as a dataset.', () => { + const caseId = '47'; + const rectangleShape2Points = { + points: 'By 2 Points', + type: 'Shape', + labelName: labelName, + firstX: 400, + firstY: 100, + secondX: 500, + secondY: 200, + }; + + before(() => { + cy.openTaskJob(taskName); + cy.createRectangle(rectangleShape2Points); + cy.saveJob(); + }); + + after('Remove annotations and save job', () => { + cy.removeAnnotations(); + cy.saveJob('PUT'); + }); + + describe(`Testing case "${caseId}"`, () => { + it('Go to Menu. Press "Export as a dataset" -> "CVAT for images".', () => { + cy.server().route('GET', '/api/v1/tasks/**/dataset**').as('exportDataset'); + cy.interactMenu('Export as a dataset'); + cy.get('.cvat-menu-export-submenu-item').within(() => { + cy.contains('CVAT for images').click(); + }); + cy.wait('@exportDataset', { timeout: 5000 }).its('status').should('equal', 202); + cy.wait('@exportDataset').its('status').should('equal', 201); + }); + }); +});