|
|
|
|
@ -96,9 +96,7 @@ Cypress.Commands.add('openTaskJob', (taskName, jobNumber = 0) => {
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('createRectangle', (createRectangleParams) => {
|
|
|
|
|
cy.get('.cvat-draw-rectangle-control').click();
|
|
|
|
|
if (createRectangleParams.switchLabel) {
|
|
|
|
|
cy.switchLabel(createRectangleParams.labelName, 'rectangle');
|
|
|
|
|
}
|
|
|
|
|
cy.switchLabel(createRectangleParams.labelName, 'rectangle');
|
|
|
|
|
cy.contains('Draw new rectangle')
|
|
|
|
|
.parents('.cvat-draw-shape-popover-content')
|
|
|
|
|
.within(() => {
|
|
|
|
|
@ -123,7 +121,7 @@ Cypress.Commands.add('switchLabel', (labelName, objectType) => {
|
|
|
|
|
cy.contains(regex).parents('.cvat-draw-shape-popover-content').within(() => {
|
|
|
|
|
cy.get('.ant-select-selection-selected-value').click();
|
|
|
|
|
});
|
|
|
|
|
cy.get('.ant-select-dropdown-menu').last().contains(labelName).click();
|
|
|
|
|
cy.get('.ant-select-dropdown').not('.ant-select-dropdown-hidden').contains(new RegExp(`^${labelName}$`, 'g')).click();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) => {
|
|
|
|
|
@ -146,9 +144,7 @@ Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) =>
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('createPoint', (createPointParams) => {
|
|
|
|
|
cy.get('.cvat-draw-points-control').click();
|
|
|
|
|
if (createPointParams.switchLabel) {
|
|
|
|
|
cy.switchLabel(createPointParams.labelName, 'points');
|
|
|
|
|
}
|
|
|
|
|
cy.switchLabel(createPointParams.labelName, 'points');
|
|
|
|
|
cy.contains('Draw new points')
|
|
|
|
|
.parents('.cvat-draw-shape-popover-content')
|
|
|
|
|
.within(() => {
|
|
|
|
|
@ -190,9 +186,7 @@ Cypress.Commands.add('shapeGrouping', (firstX, firstY, lastX, lastY) => {
|
|
|
|
|
Cypress.Commands.add('createPolygon', (createPolygonParams) => {
|
|
|
|
|
if (!createPolygonParams.reDraw) {
|
|
|
|
|
cy.get('.cvat-draw-polygon-control').click();
|
|
|
|
|
if (createPolygonParams.switchLabel) {
|
|
|
|
|
cy.switchLabel(createPolygonParams.labelName, 'polygon');
|
|
|
|
|
}
|
|
|
|
|
cy.switchLabel(createPolygonParams.labelName, 'polygon');
|
|
|
|
|
cy.contains('Draw new polygon')
|
|
|
|
|
.parents('.cvat-draw-shape-popover-content')
|
|
|
|
|
.within(() => {
|
|
|
|
|
@ -242,16 +236,14 @@ Cypress.Commands.add('changeLabelAAM', (labelName) => {
|
|
|
|
|
cy.get('.attribute-annotation-sidebar-basics-editor').within(() => {
|
|
|
|
|
cy.get('.ant-select-selection').click();
|
|
|
|
|
});
|
|
|
|
|
cy.get('.ant-select-dropdown-menu-item').contains(labelName).click();
|
|
|
|
|
cy.get('.ant-select-dropdown').not('.ant-select-dropdown-hidden').contains(new RegExp(`^${labelName}$`, 'g')).click();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('createCuboid', (createCuboidParams) => {
|
|
|
|
|
cy.get('.cvat-draw-cuboid-control').click();
|
|
|
|
|
if (createCuboidParams.switchLabel) {
|
|
|
|
|
cy.switchLabel(createCuboidParams.labelName, 'cuboid');
|
|
|
|
|
}
|
|
|
|
|
cy.switchLabel(createCuboidParams.labelName, 'cuboid');
|
|
|
|
|
cy.contains('Draw new cuboid')
|
|
|
|
|
.parents('.cvat-draw-shape-popover-content')
|
|
|
|
|
.within(() => {
|
|
|
|
|
@ -280,9 +272,7 @@ Cypress.Commands.add('updateAttributes', (multiAttrParams) => {
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('createPolyline', (createPolylineParams) => {
|
|
|
|
|
cy.get('.cvat-draw-polyline-control').click();
|
|
|
|
|
if (createPolylineParams.switchLabel) {
|
|
|
|
|
cy.switchLabel(createPolylineParams.labelName, 'polyline');
|
|
|
|
|
}
|
|
|
|
|
cy.switchLabel(createPolylineParams.labelName, 'polyline');
|
|
|
|
|
cy.contains('Draw new polyline')
|
|
|
|
|
.parents('.cvat-draw-shape-popover-content')
|
|
|
|
|
.within(() => {
|
|
|
|
|
|