|
|
|
|
@ -10,12 +10,16 @@ context('Tag annotation mode.', () => {
|
|
|
|
|
const caseId = '22';
|
|
|
|
|
|
|
|
|
|
function checkCountFrameTags(countTags) {
|
|
|
|
|
cy.get('span.cvat-tag-anntation-sidebar-frame-tag-label').should('have.length', countTags);
|
|
|
|
|
if (countTags == 0) {
|
|
|
|
|
cy.get('span.cvat-tag-anntation-sidebar-frame-tag-label').should('not.exist');
|
|
|
|
|
} else {
|
|
|
|
|
cy.get('span.cvat-tag-anntation-sidebar-frame-tag-label').should('have.length', countTags);
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function checkVisibleFrameTags(labelName) {
|
|
|
|
|
function checkPresenceFrameTags(labelName) {
|
|
|
|
|
cy.get('.cvat-tag-anntation-sidebar-frame-tags').within(() => {
|
|
|
|
|
cy.get('span.cvat-tag-anntation-sidebar-frame-tag-label').contains(labelName).should('be.visible');
|
|
|
|
|
cy.get('span.cvat-tag-anntation-sidebar-frame-tag-label').contains(labelName).should('exist');
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -44,7 +48,6 @@ context('Tag annotation mode.', () => {
|
|
|
|
|
describe(`Testing case "${caseId}"`, () => {
|
|
|
|
|
it('Go to tag annotation', () => {
|
|
|
|
|
cy.changeWorkspace('Tag annotation', labelName);
|
|
|
|
|
cy.checkFrameNum(0);
|
|
|
|
|
checkCountFrameTags(0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -52,30 +55,26 @@ context('Tag annotation mode.', () => {
|
|
|
|
|
skipFrame();
|
|
|
|
|
cy.checkFrameNum(1);
|
|
|
|
|
checkCountFrameTags(0);
|
|
|
|
|
cy.goToPreviousFrame();
|
|
|
|
|
cy.checkFrameNum(0);
|
|
|
|
|
cy.goToPreviousDefaultFrame(0);
|
|
|
|
|
checkCountFrameTags(0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('Add tag', () => {
|
|
|
|
|
addTag();
|
|
|
|
|
cy.checkFrameNum(0);
|
|
|
|
|
checkCountFrameTags(1);
|
|
|
|
|
checkVisibleFrameTags(labelName);
|
|
|
|
|
checkPresenceFrameTags(labelName);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('Set "Automatically go to the next frame" to true and add tag', () => {
|
|
|
|
|
cy.goToNextFrame();
|
|
|
|
|
cy.checkFrameNum(1);
|
|
|
|
|
cy.goToNextDefaultFrame(1);
|
|
|
|
|
checkCountFrameTags(0);
|
|
|
|
|
changeCheckboxAutomaticallyGoToNextFrame("check");
|
|
|
|
|
addTag();
|
|
|
|
|
cy.checkFrameNum(2);
|
|
|
|
|
checkCountFrameTags(0);
|
|
|
|
|
cy.goToPreviousFrame();
|
|
|
|
|
cy.checkFrameNum(1);
|
|
|
|
|
cy.goToPreviousDefaultFrame(1);
|
|
|
|
|
checkCountFrameTags(1);
|
|
|
|
|
checkVisibleFrameTags(labelName);
|
|
|
|
|
checkPresenceFrameTags(labelName);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|