Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress. Update case 95. Checking the addition of 2d and 3d tasks to the same project. #3645

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ context('Move a task to a project.', () => {
labelSecond: 'Car',
attrNameSecons: 'Color',
attrValueSecond: 'Red',
name3d: `Case ${caseID} 3D`,
label3d: 'Bus',
attrName3d: 'Type',
attrValue3d: 'Сity bus',
};

const project = {
Expand All @@ -32,6 +36,7 @@ context('Move a task to a project.', () => {
const posY = 10;
const color = 'gray';
const archiveName = `${imageFileName}.zip`;
const archiveName3d = '../../cypress/integration/canvas3d_functionality/assets/test_canvas3d.zip';
const archivePath = `cypress/fixtures/${archiveName}`;
const imagesFolder = `cypress/fixtures/${imageFileName}`;
const directoryToArchive = imagesFolder;
Expand All @@ -43,6 +48,7 @@ context('Move a task to a project.', () => {
cy.createZipArchive(directoryToArchive, archivePath);
cy.goToTaskList();
cy.createAnnotationTask(task.nameSecond, task.labelSecond, task.attrNameSecons, task.attrValueSecond, archiveName);
cy.createAnnotationTask(task.name3d, task.label3d, task.attrName3d, task.attrValue3d, archiveName3d);
});

beforeEach(() => {
Expand Down Expand Up @@ -72,15 +78,19 @@ context('Move a task to a project.', () => {
cy.get('.cvat-tasks-list-item').should('exist').and('have.length', 2);
});

it('Move a task from task.', () => {
it('Move a task from task. Attempt to add a 3D task to a project with a 2D task.', () => {
cy.openProject(project.name);
cy.get('.cvat-tasks-list-item').should('not.exist');
cy.goToTaskList();
cy.openTask(task.name);
cy.movingTask(task.name, project.name, task.label, project.label, true);
cy.goToTaskList();
cy.movingTask(task.name3d, project.name, task.label3d, project.label);
cy.get('.cvat-notification-notice-update-task-failed').should('be.visible');
cy.closeNotification('.cvat-notification-notice-update-task-failed');
cy.goToProjectsList();
cy.openProject(project.name);
cy.get('.cvat-tasks-list-item').should('exist');
cy.get('.cvat-tasks-list-item').should('exist').and('have.length', 1);
});
});
});