Set label for created object any case.

Tests adaptation.
main
Kruchinin 5 years ago
parent d20cbf610c
commit 07ba0ee248

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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 },

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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 },

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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 },

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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 },

@ -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 },

@ -4,7 +4,7 @@
/// <reference types="cypress" />
import { taskName } from '../../support/const';
import { taskName } from '../../support/const';
context('Check if the image is rotated', () => {
const caseId = '5';

@ -4,7 +4,7 @@
/// <reference types="cypress" />
import { taskName } from '../../support/const';
import { taskName } from '../../support/const';
context('Check if the image is scaled and then fitted', () => {
const caseId = '6';

@ -4,7 +4,7 @@
/// <reference types="cypress" />
import { taskName } from '../../support/const';
import { taskName } from '../../support/const';
context('Check if image was scaled to ROI', () => {
const caseId = '7';

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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,

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -4,13 +4,13 @@
/// <reference types="cypress" />
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,

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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 },

@ -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,

@ -4,16 +4,15 @@
/// <reference types="cypress" />
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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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 },

@ -4,7 +4,7 @@
/// <reference types="cypress" />
import { taskName } from '../../support/const';
import { taskName } from '../../support/const';
context('Check if the UI not to crash after remove a tag', () => {
const issueId = '1540';

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -4,7 +4,7 @@
/// <reference types="cypress" />
import { taskName } from '../../support/const';
import { taskName } from '../../support/const';
context('Tooltip does not interfere with interaction with elements.', () => {
const issueId = '1825';

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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,

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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 },

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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 },

@ -4,7 +4,7 @@
/// <reference types="cypress" />
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,

@ -4,14 +4,14 @@
/// <reference types="cypress" />
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,

@ -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(() => {

Loading…
Cancel
Save