Test adaptation for new functional object creation.

main
Kruchinin 5 years ago
parent d8f01de506
commit cb9a4b924c

@ -11,11 +11,11 @@ context('Check hide/unhide functionality from label tab for object and tag with
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 260, firstX: 260,
firstY: 200, firstY: 200,
secondX: 360, secondX: 360,
secondY: 250 secondY: 250,
}; };
before(() => { before(() => {
@ -34,17 +34,25 @@ context('Check hide/unhide functionality from label tab for object and tag with
}); });
it('Hide object by label name.', () => { it('Hide object by label name.', () => {
cy.get('.cvat-objects-sidebar-labels-list').within(() => { cy.get('.cvat-objects-sidebar-labels-list').within(() => {
cy.contains(labelName).parents('.cvat-objects-sidebar-label-item').within(() => { cy.contains(labelName)
cy.get('.cvat-label-item-button-hidden').click().should('have.class', 'cvat-label-item-button-hidden-enabled'); .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'); cy.get('#cvat_canvas_shape_1').should('be.hidden');
}); });
it('Unhide object by label name.', () => { it('Unhide object by label name.', () => {
cy.get('.cvat-objects-sidebar-labels-list').within(() => { cy.get('.cvat-objects-sidebar-labels-list').within(() => {
cy.contains(labelName).parents('.cvat-objects-sidebar-label-item').within(() => { cy.contains(labelName)
cy.get('.cvat-label-item-button-hidden').click().should('not.have.class', 'cvat-label-item-button-hidden-enabled'); .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'); cy.get('#cvat_canvas_shape_1').should('be.visible');
}); });

Loading…
Cancel
Save