Cypress test. Export as a dataset. (#2724)

main
Dmitry Kruchinin 5 years ago committed by GitHub
parent 2e325ae4d4
commit 5e0bdea87a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,43 @@
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
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);
});
});
});
Loading…
Cancel
Save