-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress. Test "Rotated bounding boxes" #3961
Cypress. Test "Rotated bounding boxes" #3961
Conversation
if (shift) { | ||
cy.get('.cvat-canvas-container').trigger('mousemove', x, y, { shiftKey: true }); | ||
} else { | ||
cy.get('.cvat-canvas-container').trigger('mousemove', x, y); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.get('.cvat-canvas-container').trigger('mousemove', x, y, { shiftKey: shift });
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
||
const transformMatrixShape = []; | ||
|
||
function testShapeRotate(shape, x, y, expectedRorate, shift) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function testShapeRotate(shape, x, y, expectedRorate, shift) { | |
function testShapeRotate(shape, x, y, expectedRotate, shift) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
} else { | ||
cy.get('.cvat-canvas-container').trigger('mousemove', x, y); | ||
} | ||
cy.get('#cvat_canvas_text_content').should('contain.text', expectedRorate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.get('#cvat_canvas_text_content').should('contain.text', expectedRorate); | |
cy.get('#cvat_canvas_text_content').should('contain.text', expectedRotate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
tests/cypress/integration/actions_objects2/case_108_rotated_bounding_boxes.js
Outdated
Show resolved
Hide resolved
|
||
it('Check rotation with hold Shift button.', () => { | ||
cy.goCheckFrameNumber(0); | ||
testShapeRotate('#cvat_canvas_shape_1', 350, 150, '13.0°', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With shift it is not expected you can rotate to 13 degrees, the nearest is 15 degrees.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
it('Check rotation with hold Shift button.', () => { | ||
cy.goCheckFrameNumber(0); | ||
testShapeRotate('#cvat_canvas_shape_1', 350, 150, '13.0°', true); | ||
testShapeRotate('#cvat_canvas_shape_1', 350, 180, '14.2°', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
// A single click does not reproduce the split a track scenario in cypress test. | ||
cy.get('#cvat_canvas_shape_2').click().click(); | ||
cy.get('#cvat_canvas_shape_3').should('have.attr', 'transform').then((shapeTransform) => { | ||
cy.get('#cvat_canvas_shape_4').should('have.attr', 'transform', shapeTransform); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of shapes (3 or 4) should be invisible. Is it correct to try comparing their attributes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably normal. It is not necessary to make the shape visible. Or is another check expected here?
} | ||
// Merge tracks | ||
cy.get('.cvat-merge-control').click(); | ||
cy.get('#cvat_canvas_shape_2').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't merge anything here, just select one existing track, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Thanks. Fixed.
Added merge shapes and verification by analogy with tracks.
…o dkru/cypress-case_108-rotated-bounding-boxes
…o openvinotoolkit-develop * 'develop' of https://github.com/openvinotoolkit/cvat: (181 commits) Cypress. Update case 105. Add check "Google cloud storage" provider fields. (cvat-ai#3980) Cypress. Fix case 108 for Firefox. (cvat-ai#3981) update project section (cvat-ai#3979) Cypress. Test "Rotated bounding boxes" (cvat-ai#3961) Issue deleting (cvat-ai#3952) Remove key_file_path field (cvat-ai#3959) update the doc for change default hostname or port (cvat-ai#3915) CVAT_server. Test for "Project updated time". (cvat-ai#3953) fix: cvat/requirements/base.txt to reduce vulnerabilities (cvat-ai#3970) Fix notification (cvat-ai#3960) Update documentation for China users (cvat-ai#3946) Support GCS (cvat-ai#3919) Cypress. Update the test for check issue 3810. (cvat-ai#3900) Update the documentation about the smooth image option (cvat-ai#3947) Project tasks pagination (cvat-ai#3910) Update documentation about review mode (cvat-ai#3944) Preserve the order of the label attributes in the object item details. (cvat-ai#3945) Added smooth image option (cvat-ai#3933) Fixed issue: autoborder points are visible for invisible shapes (cvat-ai#3931) Add FiftyOne to partners list (cvat-ai#3943) ...
* openvinotoolkit-develop: (181 commits) Cypress. Update case 105. Add check "Google cloud storage" provider fields. (cvat-ai#3980) Cypress. Fix case 108 for Firefox. (cvat-ai#3981) update project section (cvat-ai#3979) Cypress. Test "Rotated bounding boxes" (cvat-ai#3961) Issue deleting (cvat-ai#3952) Remove key_file_path field (cvat-ai#3959) update the doc for change default hostname or port (cvat-ai#3915) CVAT_server. Test for "Project updated time". (cvat-ai#3953) fix: cvat/requirements/base.txt to reduce vulnerabilities (cvat-ai#3970) Fix notification (cvat-ai#3960) Update documentation for China users (cvat-ai#3946) Support GCS (cvat-ai#3919) Cypress. Update the test for check issue 3810. (cvat-ai#3900) Update the documentation about the smooth image option (cvat-ai#3947) Project tasks pagination (cvat-ai#3910) Update documentation about review mode (cvat-ai#3944) Preserve the order of the label attributes in the object item details. (cvat-ai#3945) Added smooth image option (cvat-ai#3933) Fixed issue: autoborder points are visible for invisible shapes (cvat-ai#3931) Add FiftyOne to partners list (cvat-ai#3943) ...
Related to #3832
Motivation and context
Adding a test to test functionality "Rotated bounding boxes"
How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.