Merge branch 'develop' into do/cypress_test_pr_2203_error_сannot_read_property_at_saving_job
commit
2587d8e53d
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright (C) 2020 Intel Corporation
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
|
import { taskName, labelName } from '../../support/const';
|
||||||
|
|
||||||
|
context('Draw a point shape, specify one point', () => {
|
||||||
|
const issueId = '2306';
|
||||||
|
const createPointsShape = {
|
||||||
|
type: 'Shape',
|
||||||
|
labelName: labelName,
|
||||||
|
pointsMap: [{ x: 500, y: 200 }],
|
||||||
|
numberOfPoints: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
before(() => {
|
||||||
|
cy.openTaskJob(taskName);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe(`Testing case "${issueId}"`, () => {
|
||||||
|
it('Draw a point shape, specify one point. Drag cursor.', () => {
|
||||||
|
cy.createPoint(createPointsShape);
|
||||||
|
cy.get('.cvat-canvas-container').trigger('mousemove');
|
||||||
|
// Test fail before fix with error:
|
||||||
|
// The following error originated from your application code, not from Cypress.
|
||||||
|
// > Cannot read property 'each' of undefined.
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
// Copyright (C) 2020 Intel Corporation
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
|
context('Wrong attribute is removed in label constructor.', () => {
|
||||||
|
const issueId = '2411';
|
||||||
|
const taskRaw = [
|
||||||
|
{
|
||||||
|
name: "person",
|
||||||
|
color: "#ff6037",
|
||||||
|
attributes: [
|
||||||
|
{
|
||||||
|
name: "lower_body",
|
||||||
|
input_type: "select",
|
||||||
|
mutable: true,
|
||||||
|
values: [
|
||||||
|
"__undefined__",
|
||||||
|
"long",
|
||||||
|
"short",
|
||||||
|
"n/a"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "hair_color",
|
||||||
|
input_type: "select",
|
||||||
|
mutable: true,
|
||||||
|
values: [
|
||||||
|
"__undefined__",
|
||||||
|
"black",
|
||||||
|
"brown",
|
||||||
|
"blond",
|
||||||
|
"grey",
|
||||||
|
"other",
|
||||||
|
"n/a"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "cellphone",
|
||||||
|
input_type: "select",
|
||||||
|
mutable: true,
|
||||||
|
values: [
|
||||||
|
"__undefined__",
|
||||||
|
"yes",
|
||||||
|
"no",
|
||||||
|
"n/a"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
before(() => {
|
||||||
|
cy.visit('auth/login');
|
||||||
|
cy.login();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe(`Testing issue "${issueId}"`, () => {
|
||||||
|
it('Open the create task page.', () => {
|
||||||
|
cy.get('#cvat-create-task-button').click({ force: true });
|
||||||
|
});
|
||||||
|
it('Go to Raw labels editor. Insert values.', () => {
|
||||||
|
cy.get('[role="tab"]').contains('Raw').click();
|
||||||
|
cy.get('#labels').clear().type(JSON.stringify(taskRaw), { parseSpecialCharSequences: false });
|
||||||
|
cy.contains('Done').click();
|
||||||
|
});
|
||||||
|
it('Go to constructor tab. The label "person" appeared there.', () => {
|
||||||
|
cy.get('[role="tab"]').contains('Constructor').click();
|
||||||
|
cy.get('.cvat-constructor-viewer-item').should('have.text', 'person').within(() => {
|
||||||
|
cy.get('i[aria-label="icon: edit"]').click();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
it('Remove the average attribute "hair_color". It has been deleted.', () => {
|
||||||
|
cy.get('.cvat-label-constructor-updater').within(() => {
|
||||||
|
cy.get('.ant-row-flex-space-between').eq(1).within(() => {
|
||||||
|
cy.get('[placeholder="Name"]').invoke('val').then(placeholderNameValue => {
|
||||||
|
expect(placeholderNameValue).to.be.equal('hair_color');
|
||||||
|
});
|
||||||
|
cy.get('.cvat-delete-attribute-button').click();
|
||||||
|
});
|
||||||
|
cy.get('.ant-row-flex-space-between').eq(0).within(() => {
|
||||||
|
cy.get('[placeholder="Name"]').invoke('val').then(placeholderNameValue => {
|
||||||
|
expect(placeholderNameValue).to.be.equal('cellphone');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
cy.get('.ant-row-flex-space-between').eq(1).within(() => {
|
||||||
|
cy.get('[placeholder="Name"]').invoke('val').then(placeholderNameValue => {
|
||||||
|
expect(placeholderNameValue).to.be.equal('lower_body');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
it('Remove the latest attribute "lower_body". It has been deleted.', () => {
|
||||||
|
cy.get('.cvat-label-constructor-updater').within(() => {
|
||||||
|
cy.get('.ant-row-flex-space-between').eq(1).within(() => {
|
||||||
|
cy.get('[placeholder="Name"]').invoke('val').then(placeholderNameValue => {
|
||||||
|
expect(placeholderNameValue).to.be.equal('lower_body');
|
||||||
|
});
|
||||||
|
cy.get('.cvat-delete-attribute-button').click();
|
||||||
|
});
|
||||||
|
cy.get('.ant-row-flex-space-between').eq(0).within(() => {
|
||||||
|
cy.get('[placeholder="Name"]').invoke('val').then(placeholderNameValue => {
|
||||||
|
expect(placeholderNameValue).to.be.equal('cellphone');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
// Copyright (C) 2020 Intel Corporation
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
|
import { taskName, labelName } from '../../support/const';
|
||||||
|
|
||||||
|
context('Check hide/unhide functionality from label tab for object and tag with a same label.', () => {
|
||||||
|
const issueId = '2418';
|
||||||
|
const createRectangleShape2Points = {
|
||||||
|
points: 'By 2 Points',
|
||||||
|
type: 'Shape',
|
||||||
|
labelName: labelName,
|
||||||
|
firstX: 260,
|
||||||
|
firstY: 200,
|
||||||
|
secondX: 360,
|
||||||
|
secondY: 250,
|
||||||
|
};
|
||||||
|
|
||||||
|
before(() => {
|
||||||
|
cy.openTaskJob(taskName);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe(`Testing issue "${issueId}"`, () => {
|
||||||
|
it('Crearte an object. Create a tag.', () => {
|
||||||
|
cy.createRectangle(createRectangleShape2Points);
|
||||||
|
cy.createTag(labelName);
|
||||||
|
});
|
||||||
|
it('Go to "Labels" tab.', () => {
|
||||||
|
cy.get('.cvat-objects-sidebar').within(() => {
|
||||||
|
cy.contains('Labels').click();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
it('Hide object by label name.', () => {
|
||||||
|
cy.get('.cvat-objects-sidebar-labels-list').within(() => {
|
||||||
|
cy.contains(labelName)
|
||||||
|
.parents('.cvat-objects-sidebar-label-item')
|
||||||
|
.within(() => {
|
||||||
|
cy.get('.cvat-label-item-button-hidden')
|
||||||
|
.click()
|
||||||
|
.should('have.class', 'cvat-label-item-button-hidden-enabled');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
cy.get('#cvat_canvas_shape_1').should('be.hidden');
|
||||||
|
});
|
||||||
|
it('Unhide object by label name.', () => {
|
||||||
|
cy.get('.cvat-objects-sidebar-labels-list').within(() => {
|
||||||
|
cy.contains(labelName)
|
||||||
|
.parents('.cvat-objects-sidebar-label-item')
|
||||||
|
.within(() => {
|
||||||
|
cy.get('.cvat-label-item-button-hidden')
|
||||||
|
.click()
|
||||||
|
.should('not.have.class', 'cvat-label-item-button-hidden-enabled');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
cy.get('#cvat_canvas_shape_1').should('be.visible');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue