Skip to content

Cypress. Fix case 108 for Firefox. #3981

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ context('Rotated bounding boxes.', () => {

function testCompareRotate(shape, toFrame) {
for (let frame = 8; frame >= toFrame; frame--) {
cy.get(shape).invoke('css', 'transform').then(($transform) => {
cy.document().then((doc) => {
const shapeTranformMatrix = doc.getElementById(shape).getCTM();
cy.goToPreviousFrame(frame);
cy.get(shape).invoke('css', 'transform').then(($transform2) => {
expect($transform).not.eq($transform2);
cy.document().then((doc2) => {
const shapeTranformMatrix2 = doc2.getElementById(shape).getCTM();
expect(shapeTranformMatrix).not.deep.eq(shapeTranformMatrix2);
});
});
}
Expand All @@ -77,19 +79,21 @@ context('Rotated bounding boxes.', () => {

it('Check interpolation, merging/splitting rotated shapes.', () => {
// Check track roration on all frames
cy.get('#cvat_canvas_shape_2').invoke('css', 'transform').then((shape2) => {
cy.document().then((doc) => {
const shapeTranformMatrix = doc.getElementById('cvat_canvas_shape_2').getCTM();
for (let frame = 1; frame < 10; frame++) {
cy.goToNextFrame(frame);
cy.get('#cvat_canvas_shape_2').invoke('css', 'transform').then((shape2Next) => {
expect(shape2).to.be.eq(shape2Next);
cy.document().then((docNext) => {
const nextShapeTranformMatrix = docNext.getElementById('cvat_canvas_shape_2').getCTM();
expect(nextShapeTranformMatrix).to.deep.eq(shapeTranformMatrix);
});
}
});

testShapeRotate('#cvat_canvas_shape_2', 350, 250, '91.9°');

// Comparison of the values of the shape attribute of the current frame with the previous frame
testCompareRotate('#cvat_canvas_shape_2', 0);
testCompareRotate('cvat_canvas_shape_2', 0);

// Merge shapes
cy.goCheckFrameNumber(0);
Expand All @@ -112,7 +116,7 @@ context('Rotated bounding boxes.', () => {
testShapeRotate('#cvat_canvas_shape_4', 350, 250, '18.5°');

// Comparison of the values of the shape attribute of the current frame with the previous frame
testCompareRotate('#cvat_canvas_shape_4', 2);
testCompareRotate('cvat_canvas_shape_4', 2);

cy.goCheckFrameNumber(3);
// Split tracks
Expand Down