提交 b441e0a6 编写于 作者: K Kruchinin

Some fix

上级 3aa520a3
......@@ -35,15 +35,9 @@ context('Merge/split features', () => {
cy.openTaskJob(taskName);
});
function goCheckFrameNumber(frameNum) {
cy.get('.cvat-player-frame-selector').within(() => {
cy.get('input[role="spinbutton"]').clear().type(`${frameNum}{Enter}`).should('have.value', frameNum);
});
}
describe(`Testing case "${caseId}"`, () => {
it('Create rectangle shape on first frame', () => {
goCheckFrameNumber(frameNum);
cy.goCheckFrameNumber(frameNum);
cy.createRectangle(createRectangleShape2Points);
cy.get('#cvat_canvas_shape_1')
.should('have.attr', 'x')
......@@ -52,7 +46,7 @@ context('Merge/split features', () => {
});
});
it('Create rectangle shape on third frame with another position', () => {
goCheckFrameNumber(frameNum + 2);
cy.goCheckFrameNumber(frameNum + 2);
cy.createRectangle(createRectangleShape2PointsSecond);
cy.get('#cvat_canvas_shape_2')
.should('have.attr', 'x')
......@@ -63,7 +57,7 @@ context('Merge/split features', () => {
it('Merge the objects with "Merge button"', () => {
cy.get('.cvat-merge-control').click();
cy.get('#cvat_canvas_shape_2').click();
goCheckFrameNumber(frameNum);
cy.goCheckFrameNumber(frameNum);
cy.get('#cvat_canvas_shape_1').click();
cy.get('.cvat-merge-control').click();
});
......@@ -75,7 +69,7 @@ context('Merge/split features', () => {
.within(() => {
cy.get('.cvat-object-item-button-keyframe-enabled').should('exist');
});
goCheckFrameNumber(frameNum + 2);
cy.goCheckFrameNumber(frameNum + 2);
cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible');
cy.get('#cvat-objects-sidebar-state-item-3')
.should('contain', '3')
......@@ -85,13 +79,13 @@ context('Merge/split features', () => {
});
});
it('On the second frame and on the fourth frame the track is invisible', () => {
goCheckFrameNumber(frameNum + 1);
cy.goCheckFrameNumber(frameNum + 1);
cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden');
goCheckFrameNumber(frameNum + 3);
cy.goCheckFrameNumber(frameNum + 3);
cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden');
});
it('Go to the second frame and remove "outside" flag from the track. The track now visible.', () => {
goCheckFrameNumber(frameNum + 1);
cy.goCheckFrameNumber(frameNum + 1);
cy.get('#cvat-objects-sidebar-state-item-3')
.should('contain', '3')
.and('contain', 'RECTANGLE TRACK')
......@@ -120,7 +114,7 @@ context('Merge/split features', () => {
});
});
it('On the fourth frame remove "keyframe" flag from the track. The track now visible and "outside" flag is disabled.', () => {
goCheckFrameNumber(frameNum + 3);
cy.goCheckFrameNumber(frameNum + 3);
cy.get('#cvat-objects-sidebar-state-item-3')
.should('contain', '3')
.and('contain', 'RECTANGLE TRACK')
......
......@@ -53,7 +53,7 @@ context('Navigation to empty frames', () => {
it("Press go previous with a filter. CVAT get 2nd frame. Press again. Frame wasn't changed.", () => {
for (let i = 1; i <= 2; i++) {
cy.get('.cvat-player-previous-button-filtered').click({ force: true });
cy.checkFrameNumber(2);
cy.checkFrameNum(2);
cy.get('#cvat_canvas_shape_1').should('exist');
}
});
......@@ -61,7 +61,7 @@ context('Navigation to empty frames', () => {
it("Press go next with a filter. CVAT get 4th frame. Press again. Frame wasn't changed.", () => {
for (let i = 1; i <= 2; i++) {
cy.get('.cvat-player-next-button-filtered').click({ force: true });
cy.checkFrameNumber(4);
cy.checkFrameNum(4);
cy.get('#cvat_canvas_shape_2').should('exist');
}
});
......@@ -75,13 +75,13 @@ context('Navigation to empty frames', () => {
it('Go previous to an empty frame. CVAT get 3rd frame.', () => {
cy.get('.cvat-player-previous-button-empty').click({ force: true });
cy.checkFrameNumber(3);
cy.checkFrameNum(3);
cy.get('.cvat_canvas_shape').should('not.exist');
});
it('Go next to an empty frame. CVAT get 5th frame.', () => {
cy.get('.cvat-player-next-button-empty').click({ force: true });
cy.checkFrameNumber(5);
cy.checkFrameNum(5);
cy.get('.cvat_canvas_shape').should('not.exist');
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册