|
|
|
|
@ -802,8 +802,7 @@ Cypress.Commands.add('exportTask', ({
|
|
|
|
|
cy.closeNotification('.cvat-notification-notice-export-task-start');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// FIXME: remove "checkText" after implementstion for ellipse
|
|
|
|
|
Cypress.Commands.add('shapeRotate', (shape, x, y, expectedRotateDeg, pressShift, checkText = true) => {
|
|
|
|
|
Cypress.Commands.add('shapeRotate', (shape, x, y, expectedRotateDeg, pressShift = false) => {
|
|
|
|
|
cy.get(shape)
|
|
|
|
|
.trigger('mousemove')
|
|
|
|
|
.trigger('mouseover')
|
|
|
|
|
@ -821,9 +820,7 @@ Cypress.Commands.add('shapeRotate', (shape, x, y, expectedRotateDeg, pressShift,
|
|
|
|
|
cy.document().then((doc) => {
|
|
|
|
|
const modShapeIDString = shape.substring(1); // Remove "#" from the shape id string
|
|
|
|
|
const shapeTranformMatrix = decomposeMatrix(doc.getElementById(modShapeIDString).getCTM());
|
|
|
|
|
if (checkText) {
|
|
|
|
|
cy.get('#cvat_canvas_text_content').should('contain.text', `${shapeTranformMatrix}°`);
|
|
|
|
|
}
|
|
|
|
|
cy.get('#cvat_canvas_text_content').should('contain.text', `${shapeTranformMatrix}°`);
|
|
|
|
|
expect(`${expectedRotateDeg}°`).to.be.equal(`${shapeTranformMatrix}°`);
|
|
|
|
|
});
|
|
|
|
|
cy.get('.cvat-canvas-container').trigger('mouseup');
|
|
|
|
|
|