Upate case 1. Added check label color. (#4045)

Co-authored-by: dvkruchinin <dvkruchinin@gmail.com>
main
Dmitry Kruchinin 4 years ago committed by GitHub
parent 3444ab3c4c
commit 6abc8da3a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,14 +4,14 @@
/// <reference types="cypress" />
context('Create and delete a annotation task', () => {
context('Create and delete a annotation task. Color collision.', () => {
const caseId = '1';
const labelName = `Case ${caseId}`;
const taskName = `New annotation task for ${labelName}`;
const attrName = `Attr for ${labelName}`;
const labelName = 'adaf';
const taskName = `New annotation task for Case ${caseId}`;
const attrName = `Attr for Case ${caseId}`;
const textDefaultValue = 'Some default value for type Text';
const imagesCount = 1;
const imageFileName = `image_${labelName.replace(' ', '_').toLowerCase()}`;
const imageFileName = 'image_case_1';
const width = 800;
const height = 800;
const posX = 10;
@ -21,6 +21,7 @@ context('Create and delete a annotation task', () => {
const archivePath = `cypress/fixtures/${archiveName}`;
const imagesFolder = `cypress/fixtures/${imageFileName}`;
const directoryToArchive = imagesFolder;
const newLabelName = 'adia';
before(() => {
cy.visit('auth/login');
@ -29,15 +30,27 @@ context('Create and delete a annotation task', () => {
cy.createZipArchive(directoryToArchive, archivePath);
});
describe(`Testing "${labelName}"`, () => {
it('Create a task', () => {
describe(`Testing "Case ${caseId}"`, () => {
it('Create a task.', () => {
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, archiveName);
});
it('Delete the created task', () => {
it('Add a label. Check labels color.', () => {
cy.openTask(taskName);
cy.addNewLabel(newLabelName);
cy.get('.cvat-constructor-viewer-item').first().then((firstLabel) => {
cy.get('.cvat-constructor-viewer-item').last().then((secondLabel) => {
expect(firstLabel.attr('style')).not.equal(secondLabel.attr('style'));
});
});
});
it('Delete the created task.', () => {
cy.goToTaskList();
cy.deleteTask(taskName);
});
it('Deleted task not exist', () => {
it('Deleted task not exist.', () => {
cy.contains('strong', taskName)
.parents('.cvat-tasks-list-item')
.should('have.attr', 'style')
Loading…
Cancel
Save