Cypress test. Issue 2418.

Check hide/unhide functionality from label tab for object and tag with a same label.
main
Kruchinin 5 years ago
parent a9b2817562
commit 20c6567501

@ -0,0 +1,54 @@
// 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',
switchLabel: false,
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…
Cancel
Save