diff --git a/tests/cypress/integration/actions_tasks_objects/case_5_image_rotate.js b/tests/cypress/integration/actions_tasks_objects/case_5_image_rotate.js index 2bed40e2..2a237220 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_5_image_rotate.js +++ b/tests/cypress/integration/actions_tasks_objects/case_5_image_rotate.js @@ -11,11 +11,14 @@ context('Check if the image is rotated', () => { function imageRotate(direction = 'anticlockwise') { cy.get('.cvat-rotate-canvas-control').trigger('mouseover'); + cy.get('.cvat-rotate-canvas-popover-visible').should('exist'); if (direction === 'clockwise') { cy.get('.cvat-rotate-canvas-controls-right').click(); } else { cy.get('.cvat-rotate-canvas-controls-left').click(); } + cy.get('.cvat-canvas-container').click(); // Hide popover + cy.get('.cvat-rotate-canvas-popover-visible').should('not.exist'); } function scaleFitImage() { @@ -32,6 +35,7 @@ context('Check if the image is rotated', () => { scaleAfter = Number($styles.match(/scale\((\d\.\d+)\)/m)[1]); cy.expect(scaleBefore).to.be.greaterThan(scaleAfter); cy.get('#cvat_canvas_content').dblclick(); + cy.get('.cvat-rotate-canvas-popover-visible').should('not.exist'); cy.get('#cvat_canvas_background').should('have.attr', 'style').and('contain', scaleBefore); }); }