+
-
@@ -37,7 +37,7 @@ function ObjectSwitcher(props: Props): JSX.Element {
{`[${currentIndex + 1}/${objectsCount}]`}
- nextObject(1)}>
+ nextObject(1)}>
diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss
index 908ab6e8..ce685436 100644
--- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss
+++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/styles.scss
@@ -13,8 +13,8 @@
padding: 5px;
}
-.attribute-annotation-sidebar-object-switcher,
-.attribute-annotation-sidebar-attribute-switcher {
+.cvat-attribute-annotation-sidebar-object-switcher,
+.cvat-attribute-annotation-sidebar-attribute-switcher {
display: flex;
align-items: center;
justify-content: space-between;
@@ -32,7 +32,7 @@
}
}
-.attribute-annotation-sidebar-basics-editor {
+.cvat-attribute-annotation-sidebar-basics-editor {
display: flex;
align-items: center;
justify-content: space-between;
@@ -58,7 +58,7 @@
justify-content: space-around;
}
-.attribute-annotation-sidebar-attr-editor {
+.cvat-attribute-annotation-sidebar-attr-editor {
display: flex;
align-items: center;
justify-content: space-around;
diff --git a/tests/cypress/integration/actions_tasks_objects/case_32_attribute_annotation_mode_zoom_margin_feature.js b/tests/cypress/integration/actions_tasks_objects/case_32_attribute_annotation_mode_zoom_margin_feature.js
new file mode 100644
index 00000000..09a4fe11
--- /dev/null
+++ b/tests/cypress/integration/actions_tasks_objects/case_32_attribute_annotation_mode_zoom_margin_feature.js
@@ -0,0 +1,65 @@
+// Copyright (C) 2020 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+
+///
+
+import { taskName, labelName } from '../../support/const';
+
+context('Attribute annotation mode (AAM) zoom margin feature', () => {
+ const caseId = '32';
+ const rectangleShape2Points = {
+ points: 'By 2 Points',
+ type: 'Shape',
+ labelName: labelName,
+ firstX: 100,
+ firstY: 100,
+ secondX: 150,
+ secondY: 150,
+ };
+
+ function changeSettingsZoomMargin(valueZoomMargin) {
+ cy.openSettings();
+ cy.get('.cvat-settings-modal').within(() => {
+ cy.contains('Workspace').click();
+ cy.get('.cvat-workspace-settings-aam-zoom-margin').within(() => {
+ cy.get('[role="spinbutton"]').clear().type(valueZoomMargin);
+ });
+ });
+ cy.closeSettings();
+ }
+
+ before(() => {
+ cy.openTaskJob(taskName);
+
+ // create object and tag
+ cy.createRectangle(rectangleShape2Points);
+ cy.createTag(labelName);
+
+ // go to AAM workspace
+ cy.changeWorkspace('Attribute annotation', labelName);
+ });
+
+ describe(`Testing case "${caseId}"`, () => {
+ it('Change AAM zoom margin on workspace with rectangle', () => {
+ cy.get('.cvat-attribute-annotation-sidebar-object-switcher').should('contain', `${labelName} 1 [1/2]`);
+ cy.getScaleValue().then((scaleBeforeChangeZoomMargin) => {
+ changeSettingsZoomMargin(150);
+ cy.getScaleValue().then((scaleAfterChangeZoomMargin) => {
+ expect(scaleBeforeChangeZoomMargin).to.be.greaterThan(scaleAfterChangeZoomMargin);
+ });
+ });
+ });
+
+ it('Change AAM zoom margin on workspace with tag', () => {
+ cy.get('.cvat-attribute-annotation-sidebar-object-switcher-right').click();
+ cy.get('.cvat-attribute-annotation-sidebar-object-switcher').should('contain', `${labelName} 2 [2/2]`);
+ cy.getScaleValue().then((scaleBeforeChangeZoomMargin) => {
+ changeSettingsZoomMargin(200);
+ cy.getScaleValue().then((scaleAfterChangeZoomMargin) => {
+ expect(scaleBeforeChangeZoomMargin).to.be.eq(scaleAfterChangeZoomMargin);
+ });
+ });
+ });
+ });
+});
diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js b/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js
index 429e20e7..75641b9b 100644
--- a/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js
+++ b/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js
@@ -36,18 +36,18 @@ context('The highlighted attribute in AAM should correspond to the chosen attrib
textValue = $textValue.text().split(': ')[1];
});
});
- cy.get('.attribute-annotation-sidebar-attr-editor').within(() => {
+ cy.get('.cvat-attribute-annotation-sidebar-attr-editor').within(() => {
cy.get('[type="text"]').should('have.value', textValue);
});
});
it('Go to next attribute and check again', () => {
- cy.get('.attribute-annotation-sidebar-attribute-switcher').find('.anticon-right').click({ force: true });
+ cy.get('.cvat-attribute-annotation-sidebar-attribute-switcher-right').click();
cy.get('.cvat_canvas_text').within(() => {
cy.get('[style="fill: red;"]').then(($textValue) => {
textValue = $textValue.text().split(': ')[1];
});
});
- cy.get('.attribute-annotation-sidebar-attr-editor').within(() => {
+ cy.get('.cvat-attribute-annotation-sidebar-attr-editor').within(() => {
cy.get('[type="text"]').should('have.value', textValue);
});
});
diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js b/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js
index 28d4ae4a..5245e7e1 100644
--- a/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js
+++ b/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js
@@ -52,15 +52,12 @@ context('An error occurs in AAM when switching to 2 frames, if the frames have o
});
});
it('Go to next object', () => {
- cy.get('.attribute-annotation-sidebar-object-switcher')
- .should('contain', `${labelName} 1 [1/2]`)
- .find('.anticon-right')
- .click({ force: true });
+ cy.get('.cvat-attribute-annotation-sidebar-object-switcher-right').click();
});
it('Page with the error is missing', () => {
cy.contains('Oops, something went wrong', { timeout: 1000 }).should('not.exist');
cy.changeLabelAAM(labelName);
- cy.get('.attribute-annotation-sidebar-object-switcher').should('contain', `${labelName} 2 [2/2]`);
+ cy.get('.cvat-attribute-annotation-sidebar-object-switcher').should('contain', `${labelName} 2 [2/2]`);
});
});
});
diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js
index 33e97797..785af65d 100644
--- a/tests/cypress/support/commands.js
+++ b/tests/cypress/support/commands.js
@@ -272,10 +272,11 @@ Cypress.Commands.add('changeWorkspace', (mode, labelName) => {
});
Cypress.Commands.add('changeLabelAAM', (labelName) => {
+
cy.get('.cvat-workspace-selector').then((value) => {
const cvatWorkspaceSelectorValue = value.text();
- if (cvatWorkspaceSelectorValue === 'Attribute annotation') {
- cy.get('.attribute-annotation-sidebar-basics-editor').within(() => {
+ if (cvatWorkspaceSelectorValue.includes('Attribute annotation')) {
+ cy.get('.cvat-attribute-annotation-sidebar-basics-editor').within(() => {
cy.get('.ant-select-selector').click();
});
cy.get('.ant-select-dropdown')