Cypress test. Create a task with manifest file. (#3014)

* Update cypress configs

* Add manifest as an asset

* Cypress test. Create a task with manifest file.

* Rework assets

* Update cypress test

* Add check container existing
main
Dmitry Kruchinin 5 years ago committed by GitHub
parent 1f56fd286c
commit 70a9071de8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,10 +12,10 @@
},
"testFiles": [
"auth_page.js",
"actions_tasks_objects/**/*",
"actions_users/**/*",
"actions_projects/**/*",
"canvas3d_functionality/*",
"actions_tasks_objects/**/*.js",
"actions_users/**/*.js",
"actions_projects/**/*.js",
"canvas3d_functionality/*.js",
"remove_users_tasks_projects.js"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -0,0 +1,4 @@
{"version":"1.0"}
{"type":"images"}
{"name":"image_case_65_1","extension":".png","width":800,"height":800,"checksum":"82d6b0b6e0dfb3c63ac49880c3756b1a"}
{"name":"image_case_65_2","extension":".png","width":800,"height":800,"checksum":"20ab1351cfad5bbbca009ac4c6522ede"}

@ -0,0 +1,47 @@
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
context('Create an annotation task with manifest.', () => {
const caseId = '65';
const labelName = `Case ${caseId}`;
const taskName = `New annotation task for ${labelName}`;
const attrName = `Attr for ${labelName}`;
const textDefaultValue = 'Some default value for type Text';
const pathToFiles = `${__dirname}/assets/case_65_manifest`;
let filesToAttache = [];
before(() => {
cy.visit('auth/login');
cy.login();
});
describe(`Testing "${labelName}"`, () => {
it('Task created successfully.', () => {
cy.task('listFiles', pathToFiles).then(($files) => {
$files.forEach(($el) => {
// Add the path relative to the fixtures folder to the file names for the plugin "cypress-file-upload" to work correctly
filesToAttache.push(`../../${pathToFiles}/${$el}`);
});
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, filesToAttache);
});
cy.get('.cvat-notification-create-task-success').should('exist');
cy.get('.cvat-notification-create-task-fail').should('not.exist');
});
it('The task and a job opened successfully.', () => {
cy.openTaskJob(taskName);
});
it('Moving through frames works correctly.', () => {
cy.checkFrameNum(0);
cy.get('.cvat-player-filename-wrapper').should('have.text', 'image_case_65_1.png');
cy.get('.cvat-player-next-button').click();
cy.get('.cvat-canvas-container').should('exist');
cy.checkFrameNum(1);
cy.get('.cvat-player-filename-wrapper').should('have.text', 'image_case_65_2.png');
});
});
});

@ -11,10 +11,10 @@
},
"testFiles": [
"auth_page.js",
"actions_tasks_objects/*",
"actions_projects/*",
"actions_users/*",
"email_system/*",
"actions_tasks_objects/*.js",
"actions_projects/*.js",
"actions_users/*.js",
"email_system/*.js",
"remove_users_tasks_projects.js"
]
}

Loading…
Cancel
Save