diff --git a/tests/cypress/integration/actions_tasks_objects/case_10_polygon_shape_track_label_points.js b/tests/cypress/integration/actions_tasks_objects/case_10_polygon_shape_track_label_points.js index b582b67a..902e03d4 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_10_polygon_shape_track_label_points.js +++ b/tests/cypress/integration/actions_tasks_objects/case_10_polygon_shape_track_label_points.js @@ -4,7 +4,7 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Actions on polygon', () => { const caseId = '10'; @@ -12,7 +12,7 @@ context('Actions on polygon', () => { const createPolygonShape = { reDraw: false, type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 200, y: 200 }, { x: 250, y: 200 }, @@ -24,7 +24,7 @@ context('Actions on polygon', () => { const createPolygonTrack = { reDraw: false, type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 300, y: 200 }, { x: 350, y: 200 }, @@ -36,7 +36,7 @@ context('Actions on polygon', () => { const createPolygonShapePoints = { reDraw: false, type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 400, y: 200 }, { x: 450, y: 200 }, @@ -49,7 +49,7 @@ context('Actions on polygon', () => { const createPolygonTrackPoints = { reDraw: false, type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 500, y: 200 }, { x: 550, y: 200 }, @@ -62,7 +62,6 @@ context('Actions on polygon', () => { const createPolygonShapeSwitchLabel = { reDraw: false, type: 'Shape', - switchLabel: true, labelName: newLabelName, pointsMap: [ { x: 600, y: 200 }, @@ -75,7 +74,6 @@ context('Actions on polygon', () => { const createPolygonTrackSwitchLabel = { reDraw: false, type: 'Track', - switchLabel: true, labelName: newLabelName, pointsMap: [ { x: 700, y: 200 }, diff --git a/tests/cypress/integration/actions_tasks_objects/case_11_polylines_shape_track_label_points.js b/tests/cypress/integration/actions_tasks_objects/case_11_polylines_shape_track_label_points.js index 4039a98b..ca9e53b2 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_11_polylines_shape_track_label_points.js +++ b/tests/cypress/integration/actions_tasks_objects/case_11_polylines_shape_track_label_points.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Actions on polylines', () => { const caseId = '11'; const newLabelName = `New label for case ${caseId}`; const createPolylinesShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 200, y: 200 }, { x: 250, y: 200 }, @@ -22,7 +22,7 @@ context('Actions on polylines', () => { }; const createPolylinesTrack = { type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 300, y: 200 }, { x: 350, y: 200 }, @@ -33,7 +33,7 @@ context('Actions on polylines', () => { }; const createPolylinesShapePoints = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 400, y: 200 }, { x: 450, y: 200 }, @@ -45,7 +45,7 @@ context('Actions on polylines', () => { }; const createPolylinesTrackPoints = { type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 500, y: 200 }, { x: 550, y: 200 }, @@ -57,7 +57,6 @@ context('Actions on polylines', () => { }; const createPolylinesShapeSwitchLabel = { type: 'Shape', - switchLabel: true, labelName: newLabelName, pointsMap: [ { x: 600, y: 200 }, @@ -69,7 +68,6 @@ context('Actions on polylines', () => { }; const createPolylinesTrackSwitchLabel = { type: 'Track', - switchLabel: true, labelName: newLabelName, pointsMap: [ { x: 700, y: 200 }, diff --git a/tests/cypress/integration/actions_tasks_objects/case_12_points_shape_track_label.js b/tests/cypress/integration/actions_tasks_objects/case_12_points_shape_track_label.js index 9ab345ab..eeecfab7 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_12_points_shape_track_label.js +++ b/tests/cypress/integration/actions_tasks_objects/case_12_points_shape_track_label.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Actions on points', () => { const caseId = '12'; const newLabelName = `New label for case ${caseId}`; const createPointsShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 200, y: 200 }, { x: 250, y: 200 }, @@ -22,7 +22,7 @@ context('Actions on points', () => { }; const createPointsTrack = { type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 300, y: 200 }, { x: 350, y: 200 }, @@ -33,7 +33,7 @@ context('Actions on points', () => { }; const createPointsShapePoints = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 400, y: 200 }, { x: 450, y: 200 }, @@ -45,7 +45,7 @@ context('Actions on points', () => { }; const createPointsTrackPoints = { type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 500, y: 200 }, { x: 550, y: 200 }, @@ -57,7 +57,6 @@ context('Actions on points', () => { }; const createPointsShapeSwitchLabel = { type: 'Shape', - switchLabel: true, labelName: newLabelName, pointsMap: [ { x: 600, y: 200 }, @@ -69,7 +68,6 @@ context('Actions on points', () => { }; const createPointsTrackSwitchLabel = { type: 'Track', - switchLabel: true, labelName: newLabelName, pointsMap: [ { x: 700, y: 200 }, diff --git a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js index 70139bc8..2588b646 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Merge/split features', () => { const caseId = '13'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -20,7 +20,7 @@ context('Merge/split features', () => { const createRectangleShape2PointsSecond = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: createRectangleShape2Points.firstX + 300, firstY: createRectangleShape2Points.firstY, secondX: createRectangleShape2Points.secondX + 300, diff --git a/tests/cypress/integration/actions_tasks_objects/case_14_appearance_features.js b/tests/cypress/integration/actions_tasks_objects/case_14_appearance_features.js index a1f6c001..92909f13 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_14_appearance_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_14_appearance_features.js @@ -4,7 +4,7 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Appearance features', () => { const caseId = '14'; @@ -15,7 +15,7 @@ context('Appearance features', () => { const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 100, firstY: 350, secondX: 200, @@ -24,7 +24,7 @@ context('Appearance features', () => { const createPolygonShape = { reDraw: false, type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 250, y: 350 }, { x: 300, y: 300 }, @@ -35,7 +35,7 @@ context('Appearance features', () => { }; const createPolylinesShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 350, y: 350 }, { x: 400, y: 300 }, @@ -48,7 +48,7 @@ context('Appearance features', () => { const createCuboidShape2Points = { points: 'From rectangle', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 450, firstY: 350, secondX: 550, @@ -56,7 +56,7 @@ context('Appearance features', () => { }; const createPointsShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [{ x: 650, y: 350 }], complete: true, numberOfPoints: null, diff --git a/tests/cypress/integration/actions_tasks_objects/case_15_group_features.js b/tests/cypress/integration/actions_tasks_objects/case_15_group_features.js index 5b0bd1d0..9fa5191e 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_15_group_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_15_group_features.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Group features', () => { const caseId = '15'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -20,7 +20,7 @@ context('Group features', () => { const createRectangleShape2PointsSecond = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: createRectangleShape2Points.firstX + 300, firstY: createRectangleShape2Points.firstY, secondX: createRectangleShape2Points.secondX + 300, @@ -29,7 +29,7 @@ context('Group features', () => { const createRectangleTrack2Points = { points: 'By 2 Points', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 600, secondX: 350, @@ -38,7 +38,7 @@ context('Group features', () => { const createRectangleTrack2PointsSecond = { points: 'By 2 Points', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: createRectangleTrack2Points.firstX + 300, firstY: createRectangleTrack2Points.firstY, secondX: createRectangleTrack2Points.secondX + 300, diff --git a/tests/cypress/integration/actions_tasks_objects/case_16_z_order_features.js b/tests/cypress/integration/actions_tasks_objects/case_16_z_order_features.js index 4b64e4e1..e320ee97 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_16_z_order_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_16_z_order_features.js @@ -4,7 +4,7 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Actions on polygon', () => { const caseId = '16'; @@ -12,7 +12,7 @@ context('Actions on polygon', () => { const createPolygonShapeFirst = { reDraw: false, type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 340, y: 200 }, { x: 590, y: 200 }, @@ -24,7 +24,7 @@ context('Actions on polygon', () => { const createPolygonShapeSecond = { reDraw: false, type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 190, y: 210 }, { x: 440, y: 210 }, diff --git a/tests/cypress/integration/actions_tasks_objects/case_17_lock_hide_features.js b/tests/cypress/integration/actions_tasks_objects/case_17_lock_hide_features.js index 7814e820..030a93e0 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_17_lock_hide_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_17_lock_hide_features.js @@ -16,7 +16,7 @@ context('Lock/hide features.', () => { const createPolygonShape = { reDraw: false, type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 200, y: 200 }, { x: 250, y: 200 }, @@ -28,7 +28,7 @@ context('Lock/hide features.', () => { const createRectangleTrack2Points = { points: 'By 2 Points', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: 260, firstY: 200, secondX: 360, @@ -37,7 +37,7 @@ context('Lock/hide features.', () => { const createCuboidShape4Points = { points: 'By 4 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 400, firstY: 350, secondX: 500, @@ -49,7 +49,6 @@ context('Lock/hide features.', () => { }; const createPolylinesShapeSwitchLabel = { type: 'Shape', - switchLabel: true, labelName: newLabelName1, pointsMap: [ { x: 600, y: 200 }, @@ -61,7 +60,6 @@ context('Lock/hide features.', () => { }; const createPointsShapeSwitchLabel = { type: 'Shape', - switchLabel: true, labelName: newLabelName2, pointsMap: [ { x: 700, y: 200 } @@ -72,7 +70,6 @@ context('Lock/hide features.', () => { const createRectangleShape4Points = { points: 'By 4 Points', type: 'Shape', - switchLabel: true, labelName: newLabelName3, firstX: 550, firstY: 350, @@ -86,7 +83,6 @@ context('Lock/hide features.', () => { const createPolygonTrack = { reDraw: false, type: 'Track', - switchLabel: true, labelName: newLabelName4, pointsMap: [ { x: 700, y: 350 }, diff --git a/tests/cypress/integration/actions_tasks_objects/case_8_rectangle_shape_track_label.js b/tests/cypress/integration/actions_tasks_objects/case_8_rectangle_shape_track_label.js index ea35c5dc..870c858d 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_8_rectangle_shape_track_label.js +++ b/tests/cypress/integration/actions_tasks_objects/case_8_rectangle_shape_track_label.js @@ -4,7 +4,7 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Actions on rectangle', () => { const caseId = '8'; @@ -12,7 +12,7 @@ context('Actions on rectangle', () => { const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -21,7 +21,7 @@ context('Actions on rectangle', () => { const createRectangleShape4Points = { points: 'By 4 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 400, firstY: 350, secondX: 500, @@ -34,7 +34,7 @@ context('Actions on rectangle', () => { const createRectangleTrack2Points = { points: 'By 2 Points', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: createRectangleShape2Points.firstX, firstY: createRectangleShape2Points.firstY - 150, secondX: createRectangleShape2Points.secondX, @@ -43,7 +43,7 @@ context('Actions on rectangle', () => { const createRectangleTrack4Points = { points: 'By 4 Points', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: createRectangleShape4Points.firstX, firstY: createRectangleShape4Points.firstY - 150, secondX: createRectangleShape4Points.secondX - 100, @@ -57,7 +57,6 @@ context('Actions on rectangle', () => { labelName: newLabelName, points: 'By 2 Points', type: 'Shape', - switchLabel: true, firstX: createRectangleShape2Points.firstX, firstY: createRectangleShape2Points.firstY + 150, secondX: createRectangleShape2Points.secondX, @@ -67,7 +66,6 @@ context('Actions on rectangle', () => { labelName: newLabelName, points: 'By 4 Points', type: 'Shape', - switchLabel: true, firstX: createRectangleShape4Points.firstX, firstY: createRectangleShape4Points.firstY + 150, secondX: createRectangleShape4Points.secondX, diff --git a/tests/cypress/integration/actions_tasks_objects/case_9_cuboid_shape_track_label.js b/tests/cypress/integration/actions_tasks_objects/case_9_cuboid_shape_track_label.js index 58976d1c..2197239b 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_9_cuboid_shape_track_label.js +++ b/tests/cypress/integration/actions_tasks_objects/case_9_cuboid_shape_track_label.js @@ -4,7 +4,7 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Actions on Cuboid', () => { const caseId = '9'; @@ -12,7 +12,7 @@ context('Actions on Cuboid', () => { const createCuboidShape2Points = { points: 'From rectangle', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -21,7 +21,7 @@ context('Actions on Cuboid', () => { const createCuboidShape4Points = { points: 'By 4 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 400, firstY: 350, secondX: 500, @@ -34,7 +34,7 @@ context('Actions on Cuboid', () => { const createCuboidTrack2Points = { points: 'From rectangle', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: createCuboidShape2Points.firstX, firstY: createCuboidShape2Points.firstY - 150, secondX: createCuboidShape2Points.secondX, @@ -43,7 +43,7 @@ context('Actions on Cuboid', () => { const createCuboidTrack4Points = { points: 'By 4 Points', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: createCuboidShape4Points.firstX, firstY: createCuboidShape4Points.firstY - 150, secondX: createCuboidShape4Points.secondX - 100, @@ -57,7 +57,6 @@ context('Actions on Cuboid', () => { labelName: newLabelName, points: 'From rectangle', type: 'Shape', - switchLabel: true, firstX: createCuboidShape2Points.firstX, firstY: createCuboidShape2Points.firstY + 150, secondX: createCuboidShape2Points.secondX, @@ -67,7 +66,6 @@ context('Actions on Cuboid', () => { labelName: newLabelName, points: 'By 4 Points', type: 'Shape', - switchLabel: true, firstX: createCuboidShape4Points.firstX, firstY: createCuboidShape4Points.firstY + 150, secondX: createCuboidShape4Points.secondX, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js b/tests/cypress/integration/actions_tasks_objects/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js index 9b029e5f..1bcb8471 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Check if UI not fails with shape dragging over sidebar', () => { const issueId = '1216'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -20,7 +20,7 @@ context('Check if UI not fails with shape dragging over sidebar', () => { const createRectangleShape2PointsSecond = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: createRectangleShape2Points.firstX, firstY: createRectangleShape2Points.firstY - 150, secondX: createRectangleShape2Points.secondX, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1368_points_track_invisible_next_frame.js b/tests/cypress/integration/actions_tasks_objects/issue_1368_points_track_invisible_next_frame.js index cef2ed3d..662a5310 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1368_points_track_invisible_next_frame.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1368_points_track_invisible_next_frame.js @@ -4,13 +4,13 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Points track it is still invisible on next frames', () => { const issueId = '1368'; const createPointsTrack = { type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [{ x: 300, y: 410 }], complete: true, numberOfPoints: null, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1391_delete_point.js b/tests/cypress/integration/actions_tasks_objects/issue_1391_delete_point.js index fbe0bdbd..c7792000 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1391_delete_point.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1391_delete_point.js @@ -4,7 +4,7 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('When delete a point, the required point is deleted.', () => { const issueId = '1391'; @@ -12,7 +12,7 @@ context('When delete a point, the required point is deleted.', () => { let pointsСoordinatesAfterDeletePoint = []; const createPolylinesShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 309, y: 250 }, { x: 309, y: 350 }, 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 991f91d6..429e20e7 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 @@ -12,7 +12,7 @@ context('The highlighted attribute in AAM should correspond to the chosen attrib const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1429_check_new_label.js b/tests/cypress/integration/actions_tasks_objects/issue_1429_check_new_label.js index e3eeb5e1..d30f3b7d 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1429_check_new_label.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1429_check_new_label.js @@ -4,16 +4,15 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Check if the new label reflects in the options', () => { const issueId = '1429'; - const labelName = `Issue ${issueId}`; const newLabelName = `New ${labelName}`; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1433_hide_functionality.js b/tests/cypress/integration/actions_tasks_objects/issue_1433_hide_functionality.js index 111de65d..6dc8f5ad 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1433_hide_functionality.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1433_hide_functionality.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Check hide functionality (H)', () => { const issueId = '1433'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1438_cancel_multiple_paste_ui_not_lock.js b/tests/cypress/integration/actions_tasks_objects/issue_1438_cancel_multiple_paste_ui_not_lock.js index 16f36cf3..ec5303f0 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1438_cancel_multiple_paste_ui_not_lock.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1438_cancel_multiple_paste_ui_not_lock.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Cancel "multiple paste". UI is not locked.', () => { const issueId = '1438'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1439_blocked_object_info.js b/tests/cypress/integration/actions_tasks_objects/issue_1439_blocked_object_info.js index edc5fcb3..8f44ac13 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1439_blocked_object_info.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1439_blocked_object_info.js @@ -11,7 +11,7 @@ context('Information about a blocked object disappears if hover the cursor over const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -20,7 +20,7 @@ context('Information about a blocked object disappears if hover the cursor over const createRectangleShape2PointsSecond = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: createRectangleShape2Points.firstX, firstY: createRectangleShape2Points.firstY - 150, secondX: createRectangleShape2Points.secondX, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1444_filter_property_shape.js b/tests/cypress/integration/actions_tasks_objects/issue_1444_filter_property_shape.js index 25f34fb8..c6dcfd79 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1444_filter_property_shape.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1444_filter_property_shape.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Filter property "shape" work correctly', () => { const issueId = '1444'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -20,7 +20,7 @@ context('Filter property "shape" work correctly', () => { const createPolygonShape = { reDraw: false, type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 300, y: 100 }, { x: 400, y: 400 }, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js b/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js index 505444fa..1ea21d36 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Dump annotation if cuboid created', () => { const issueId = '1568'; const createCuboidShape2Points = { points: 'From rectangle', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, 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 150911ba..7527564a 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 @@ -11,7 +11,7 @@ context('An error occurs in AAM when switching to 2 frames, if the frames have o const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, @@ -20,7 +20,7 @@ context('An error occurs in AAM when switching to 2 frames, if the frames have o const createRectangleShape2PointsSecond = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: createRectangleShape2Points.firstX, firstY: createRectangleShape2Points.firstY - 150, secondX: createRectangleShape2Points.secondX, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1785_propagation_latest_frame.js b/tests/cypress/integration/actions_tasks_objects/issue_1785_propagation_latest_frame.js index 2ec62111..2f3f4ab4 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1785_propagation_latest_frame.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1785_propagation_latest_frame.js @@ -4,14 +4,14 @@ /// -import { taskName, advancedConfigurationParams } from '../../support/const'; +import { taskName, advancedConfigurationParams, labelName } from '../../support/const'; context('Check propagation work from the latest frame', () => { const issueId = '1785'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1819_first_part_splitted_track_visible.js b/tests/cypress/integration/actions_tasks_objects/issue_1819_first_part_splitted_track_visible.js index c432b409..c9ed049d 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1819_first_part_splitted_track_visible.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1819_first_part_splitted_track_visible.js @@ -4,14 +4,14 @@ /// -import { taskName, advancedConfigurationParams } from '../../support/const'; +import { taskName, advancedConfigurationParams, labelName } from '../../support/const'; context('First part of a splitted track is visible', () => { const issueId = '1819'; const createRectangleTrack2Points = { points: 'By 2 Points', type: 'Track', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1841_hidden_points_cuboids_grouping.js b/tests/cypress/integration/actions_tasks_objects/issue_1841_hidden_points_cuboids_grouping.js index f3678720..c760b7e0 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1841_hidden_points_cuboids_grouping.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1841_hidden_points_cuboids_grouping.js @@ -4,7 +4,7 @@ /// -import { taskName } from '../../support/const'; + import { taskName, labelName } from '../../support/const'; context( "Hidden objects mustn't consider when we want to group visible objects only and use an grouping area for it.", @@ -13,21 +13,21 @@ context( let bgcolor = ''; const createFirstPointsShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [{ x: 300, y: 410 }], complete: true, numberOfPoints: null, }; const createSecondPointsShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [{ x: 350, y: 410 }], complete: true, numberOfPoints: null, }; const createThridPointsShape = { type: 'Shape', - switchLabel: false, + labelName: labelName, pointsMap: [{ x: 400, y: 410 }], complete: true, numberOfPoints: null, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1870_cursor_not_jump_to_end.js b/tests/cypress/integration/actions_tasks_objects/issue_1870_cursor_not_jump_to_end.js index 7b18ee49..a113ef1e 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1870_cursor_not_jump_to_end.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1870_cursor_not_jump_to_end.js @@ -4,7 +4,7 @@ /// -import { taskName, textDefaultValue, attrName } from '../../support/const'; +import { taskName, textDefaultValue, attrName, labelName } from '../../support/const'; context( "Checks that the cursor doesn't automatically jump to the end of a word when the attribute value changes", @@ -13,7 +13,7 @@ context( const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1882_polygon_interpolation.js b/tests/cypress/integration/actions_tasks_objects/issue_1882_polygon_interpolation.js index b0e5bfba..95092731 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1882_polygon_interpolation.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1882_polygon_interpolation.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context("The points of the previous polygon mustn't appear while polygon's interpolation.", () => { const issueId = '1882'; const createPolygonTrack = { reDraw: false, type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 309, y: 431 }, { x: 360, y: 500 }, @@ -23,7 +23,7 @@ context("The points of the previous polygon mustn't appear while polygon's inter const reDrawPolygonTrack = { reDraw: true, type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 359, y: 431 }, { x: 410, y: 500 }, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1886_point_coordinates_not_duplicated.js b/tests/cypress/integration/actions_tasks_objects/issue_1886_point_coordinates_not_duplicated.js index 8d9b7cd5..e1f01e28 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1886_point_coordinates_not_duplicated.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1886_point_coordinates_not_duplicated.js @@ -4,7 +4,7 @@ /// -import { taskName, advancedConfigurationParams } from '../../support/const'; +import { taskName, advancedConfigurationParams, labelName } from '../../support/const'; context("Point coordinates are not duplicated while polygon's interpolation.", () => { const issueId = '1886'; @@ -12,7 +12,7 @@ context("Point coordinates are not duplicated while polygon's interpolation.", ( const createPolygonTrack = { reDraw: false, type: 'Track', - switchLabel: false, + labelName: labelName, pointsMap: [ { x: 300, y: 450 }, { x: 400, y: 450 }, diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1919_check_text_attr.js b/tests/cypress/integration/actions_tasks_objects/issue_1919_check_text_attr.js index 24d35618..e91e5f1b 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1919_check_text_attr.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1919_check_text_attr.js @@ -4,7 +4,7 @@ /// -import { taskName, textDefaultValue, attrName } from '../../support/const'; +import { taskName, textDefaultValue, attrName, labelName } from '../../support/const'; context('Check label attribute changes', () => { const issueId = '1919'; @@ -12,7 +12,7 @@ context('Check label attribute changes', () => { const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/integration/actions_tasks_objects/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js b/tests/cypress/integration/actions_tasks_objects/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js index 75650203..b9f462dd 100644 --- a/tests/cypress/integration/actions_tasks_objects/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js +++ b/tests/cypress/integration/actions_tasks_objects/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js @@ -4,14 +4,14 @@ /// -import { taskName } from '../../support/const'; +import { taskName, labelName } from '../../support/const'; context('Check if the UI fails by moving to the next frame while dragging the object', () => { const prId = '1370'; const createRectangleShape2Points = { points: 'By 2 Points', type: 'Shape', - switchLabel: false, + labelName: labelName, firstX: 250, firstY: 350, secondX: 350, diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index c455e1d5..695007b3 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -96,9 +96,7 @@ Cypress.Commands.add('openTaskJob', (taskName, jobNumber = 0) => { Cypress.Commands.add('createRectangle', (createRectangleParams) => { cy.get('.cvat-draw-rectangle-control').click(); - if (createRectangleParams.switchLabel) { - cy.switchLabel(createRectangleParams.labelName, 'rectangle'); - } + cy.switchLabel(createRectangleParams.labelName, 'rectangle'); cy.contains('Draw new rectangle') .parents('.cvat-draw-shape-popover-content') .within(() => { @@ -123,7 +121,7 @@ Cypress.Commands.add('switchLabel', (labelName, objectType) => { cy.contains(regex).parents('.cvat-draw-shape-popover-content').within(() => { cy.get('.ant-select-selection-selected-value').click(); }); - cy.get('.ant-select-dropdown-menu').last().contains(labelName).click(); + cy.get('.ant-select-dropdown').not('.ant-select-dropdown-hidden').contains(new RegExp(`^${labelName}$`, 'g')).click(); }); Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) => { @@ -146,9 +144,7 @@ Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) => Cypress.Commands.add('createPoint', (createPointParams) => { cy.get('.cvat-draw-points-control').click(); - if (createPointParams.switchLabel) { - cy.switchLabel(createPointParams.labelName, 'points'); - } + cy.switchLabel(createPointParams.labelName, 'points'); cy.contains('Draw new points') .parents('.cvat-draw-shape-popover-content') .within(() => { @@ -190,9 +186,7 @@ Cypress.Commands.add('shapeGrouping', (firstX, firstY, lastX, lastY) => { Cypress.Commands.add('createPolygon', (createPolygonParams) => { if (!createPolygonParams.reDraw) { cy.get('.cvat-draw-polygon-control').click(); - if (createPolygonParams.switchLabel) { - cy.switchLabel(createPolygonParams.labelName, 'polygon'); - } + cy.switchLabel(createPolygonParams.labelName, 'polygon'); cy.contains('Draw new polygon') .parents('.cvat-draw-shape-popover-content') .within(() => { @@ -242,16 +236,14 @@ Cypress.Commands.add('changeLabelAAM', (labelName) => { cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { cy.get('.ant-select-selection').click(); }); - cy.get('.ant-select-dropdown-menu-item').contains(labelName).click(); + cy.get('.ant-select-dropdown').not('.ant-select-dropdown-hidden').contains(new RegExp(`^${labelName}$`, 'g')).click(); } }); }); Cypress.Commands.add('createCuboid', (createCuboidParams) => { cy.get('.cvat-draw-cuboid-control').click(); - if (createCuboidParams.switchLabel) { - cy.switchLabel(createCuboidParams.labelName, 'cuboid'); - } + cy.switchLabel(createCuboidParams.labelName, 'cuboid'); cy.contains('Draw new cuboid') .parents('.cvat-draw-shape-popover-content') .within(() => { @@ -280,9 +272,7 @@ Cypress.Commands.add('updateAttributes', (multiAttrParams) => { Cypress.Commands.add('createPolyline', (createPolylineParams) => { cy.get('.cvat-draw-polyline-control').click(); - if (createPolylineParams.switchLabel) { - cy.switchLabel(createPolylineParams.labelName, 'polyline'); - } + cy.switchLabel(createPolylineParams.labelName, 'polyline'); cy.contains('Draw new polyline') .parents('.cvat-draw-shape-popover-content') .within(() => {