Merge pull request #2458 from dvkruchinin/dkru/set-label-any-case-creating-object

Cypress tests. Set a label when creating an object in any case.
main
Boris Sekachev 5 years ago committed by GitHub
commit 0ddd9e7c5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Actions on polygon', () => { context('Actions on polygon', () => {
const caseId = '10'; const caseId = '10';
@ -12,7 +12,7 @@ context('Actions on polygon', () => {
const createPolygonShape = { const createPolygonShape = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 200, y: 200 }, { x: 200, y: 200 },
{ x: 250, y: 200 }, { x: 250, y: 200 },
@ -24,7 +24,7 @@ context('Actions on polygon', () => {
const createPolygonTrack = { const createPolygonTrack = {
reDraw: false, reDraw: false,
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 300, y: 200 }, { x: 300, y: 200 },
{ x: 350, y: 200 }, { x: 350, y: 200 },
@ -36,7 +36,7 @@ context('Actions on polygon', () => {
const createPolygonShapePoints = { const createPolygonShapePoints = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 400, y: 200 }, { x: 400, y: 200 },
{ x: 450, y: 200 }, { x: 450, y: 200 },
@ -49,7 +49,7 @@ context('Actions on polygon', () => {
const createPolygonTrackPoints = { const createPolygonTrackPoints = {
reDraw: false, reDraw: false,
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 500, y: 200 }, { x: 500, y: 200 },
{ x: 550, y: 200 }, { x: 550, y: 200 },
@ -62,7 +62,6 @@ context('Actions on polygon', () => {
const createPolygonShapeSwitchLabel = { const createPolygonShapeSwitchLabel = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: true,
labelName: newLabelName, labelName: newLabelName,
pointsMap: [ pointsMap: [
{ x: 600, y: 200 }, { x: 600, y: 200 },
@ -75,7 +74,6 @@ context('Actions on polygon', () => {
const createPolygonTrackSwitchLabel = { const createPolygonTrackSwitchLabel = {
reDraw: false, reDraw: false,
type: 'Track', type: 'Track',
switchLabel: true,
labelName: newLabelName, labelName: newLabelName,
pointsMap: [ pointsMap: [
{ x: 700, y: 200 }, { x: 700, y: 200 },

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Actions on polylines', () => { context('Actions on polylines', () => {
const caseId = '11'; const caseId = '11';
const newLabelName = `New label for case ${caseId}`; const newLabelName = `New label for case ${caseId}`;
const createPolylinesShape = { const createPolylinesShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 200, y: 200 }, { x: 200, y: 200 },
{ x: 250, y: 200 }, { x: 250, y: 200 },
@ -22,7 +22,7 @@ context('Actions on polylines', () => {
}; };
const createPolylinesTrack = { const createPolylinesTrack = {
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 300, y: 200 }, { x: 300, y: 200 },
{ x: 350, y: 200 }, { x: 350, y: 200 },
@ -33,7 +33,7 @@ context('Actions on polylines', () => {
}; };
const createPolylinesShapePoints = { const createPolylinesShapePoints = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 400, y: 200 }, { x: 400, y: 200 },
{ x: 450, y: 200 }, { x: 450, y: 200 },
@ -45,7 +45,7 @@ context('Actions on polylines', () => {
}; };
const createPolylinesTrackPoints = { const createPolylinesTrackPoints = {
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 500, y: 200 }, { x: 500, y: 200 },
{ x: 550, y: 200 }, { x: 550, y: 200 },
@ -57,7 +57,6 @@ context('Actions on polylines', () => {
}; };
const createPolylinesShapeSwitchLabel = { const createPolylinesShapeSwitchLabel = {
type: 'Shape', type: 'Shape',
switchLabel: true,
labelName: newLabelName, labelName: newLabelName,
pointsMap: [ pointsMap: [
{ x: 600, y: 200 }, { x: 600, y: 200 },
@ -69,7 +68,6 @@ context('Actions on polylines', () => {
}; };
const createPolylinesTrackSwitchLabel = { const createPolylinesTrackSwitchLabel = {
type: 'Track', type: 'Track',
switchLabel: true,
labelName: newLabelName, labelName: newLabelName,
pointsMap: [ pointsMap: [
{ x: 700, y: 200 }, { x: 700, y: 200 },

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Actions on points', () => { context('Actions on points', () => {
const caseId = '12'; const caseId = '12';
const newLabelName = `New label for case ${caseId}`; const newLabelName = `New label for case ${caseId}`;
const createPointsShape = { const createPointsShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 200, y: 200 }, { x: 200, y: 200 },
{ x: 250, y: 200 }, { x: 250, y: 200 },
@ -22,7 +22,7 @@ context('Actions on points', () => {
}; };
const createPointsTrack = { const createPointsTrack = {
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 300, y: 200 }, { x: 300, y: 200 },
{ x: 350, y: 200 }, { x: 350, y: 200 },
@ -33,7 +33,7 @@ context('Actions on points', () => {
}; };
const createPointsShapePoints = { const createPointsShapePoints = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 400, y: 200 }, { x: 400, y: 200 },
{ x: 450, y: 200 }, { x: 450, y: 200 },
@ -45,7 +45,7 @@ context('Actions on points', () => {
}; };
const createPointsTrackPoints = { const createPointsTrackPoints = {
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 500, y: 200 }, { x: 500, y: 200 },
{ x: 550, y: 200 }, { x: 550, y: 200 },
@ -57,7 +57,6 @@ context('Actions on points', () => {
}; };
const createPointsShapeSwitchLabel = { const createPointsShapeSwitchLabel = {
type: 'Shape', type: 'Shape',
switchLabel: true,
labelName: newLabelName, labelName: newLabelName,
pointsMap: [ pointsMap: [
{ x: 600, y: 200 }, { x: 600, y: 200 },
@ -69,7 +68,6 @@ context('Actions on points', () => {
}; };
const createPointsTrackSwitchLabel = { const createPointsTrackSwitchLabel = {
type: 'Track', type: 'Track',
switchLabel: true,
labelName: newLabelName, labelName: newLabelName,
pointsMap: [ pointsMap: [
{ x: 700, y: 200 }, { x: 700, y: 200 },

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Merge/split features', () => { context('Merge/split features', () => {
const caseId = '13'; const caseId = '13';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,
@ -20,7 +20,7 @@ context('Merge/split features', () => {
const createRectangleShape2PointsSecond = { const createRectangleShape2PointsSecond = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: createRectangleShape2Points.firstX + 300, firstX: createRectangleShape2Points.firstX + 300,
firstY: createRectangleShape2Points.firstY, firstY: createRectangleShape2Points.firstY,
secondX: createRectangleShape2Points.secondX + 300, secondX: createRectangleShape2Points.secondX + 300,

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Appearance features', () => { context('Appearance features', () => {
const caseId = '14'; const caseId = '14';
@ -15,7 +15,7 @@ context('Appearance features', () => {
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 100, firstX: 100,
firstY: 350, firstY: 350,
secondX: 200, secondX: 200,
@ -24,7 +24,7 @@ context('Appearance features', () => {
const createPolygonShape = { const createPolygonShape = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 250, y: 350 }, { x: 250, y: 350 },
{ x: 300, y: 300 }, { x: 300, y: 300 },
@ -35,7 +35,7 @@ context('Appearance features', () => {
}; };
const createPolylinesShape = { const createPolylinesShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 350, y: 350 }, { x: 350, y: 350 },
{ x: 400, y: 300 }, { x: 400, y: 300 },
@ -48,7 +48,7 @@ context('Appearance features', () => {
const createCuboidShape2Points = { const createCuboidShape2Points = {
points: 'From rectangle', points: 'From rectangle',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 450, firstX: 450,
firstY: 350, firstY: 350,
secondX: 550, secondX: 550,
@ -56,7 +56,7 @@ context('Appearance features', () => {
}; };
const createPointsShape = { const createPointsShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [{ x: 650, y: 350 }], pointsMap: [{ x: 650, y: 350 }],
complete: true, complete: true,
numberOfPoints: null, numberOfPoints: null,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Group features', () => { context('Group features', () => {
const caseId = '15'; const caseId = '15';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,
@ -20,7 +20,7 @@ context('Group features', () => {
const createRectangleShape2PointsSecond = { const createRectangleShape2PointsSecond = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: createRectangleShape2Points.firstX + 300, firstX: createRectangleShape2Points.firstX + 300,
firstY: createRectangleShape2Points.firstY, firstY: createRectangleShape2Points.firstY,
secondX: createRectangleShape2Points.secondX + 300, secondX: createRectangleShape2Points.secondX + 300,
@ -29,7 +29,7 @@ context('Group features', () => {
const createRectangleTrack2Points = { const createRectangleTrack2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 600, firstY: 600,
secondX: 350, secondX: 350,
@ -38,7 +38,7 @@ context('Group features', () => {
const createRectangleTrack2PointsSecond = { const createRectangleTrack2PointsSecond = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: createRectangleTrack2Points.firstX + 300, firstX: createRectangleTrack2Points.firstX + 300,
firstY: createRectangleTrack2Points.firstY, firstY: createRectangleTrack2Points.firstY,
secondX: createRectangleTrack2Points.secondX + 300, secondX: createRectangleTrack2Points.secondX + 300,

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Actions on polygon', () => { context('Actions on polygon', () => {
const caseId = '16'; const caseId = '16';
@ -12,7 +12,7 @@ context('Actions on polygon', () => {
const createPolygonShapeFirst = { const createPolygonShapeFirst = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 340, y: 200 }, { x: 340, y: 200 },
{ x: 590, y: 200 }, { x: 590, y: 200 },
@ -24,7 +24,7 @@ context('Actions on polygon', () => {
const createPolygonShapeSecond = { const createPolygonShapeSecond = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 190, y: 210 }, { x: 190, y: 210 },
{ x: 440, y: 210 }, { x: 440, y: 210 },

@ -16,7 +16,7 @@ context('Lock/hide features.', () => {
const createPolygonShape = { const createPolygonShape = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 200, y: 200 }, { x: 200, y: 200 },
{ x: 250, y: 200 }, { x: 250, y: 200 },
@ -28,7 +28,7 @@ context('Lock/hide features.', () => {
const createRectangleTrack2Points = { const createRectangleTrack2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: 260, firstX: 260,
firstY: 200, firstY: 200,
secondX: 360, secondX: 360,
@ -37,7 +37,7 @@ context('Lock/hide features.', () => {
const createCuboidShape4Points = { const createCuboidShape4Points = {
points: 'By 4 Points', points: 'By 4 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 400, firstX: 400,
firstY: 350, firstY: 350,
secondX: 500, secondX: 500,
@ -49,7 +49,6 @@ context('Lock/hide features.', () => {
}; };
const createPolylinesShapeSwitchLabel = { const createPolylinesShapeSwitchLabel = {
type: 'Shape', type: 'Shape',
switchLabel: true,
labelName: newLabelName1, labelName: newLabelName1,
pointsMap: [ pointsMap: [
{ x: 600, y: 200 }, { x: 600, y: 200 },
@ -61,7 +60,6 @@ context('Lock/hide features.', () => {
}; };
const createPointsShapeSwitchLabel = { const createPointsShapeSwitchLabel = {
type: 'Shape', type: 'Shape',
switchLabel: true,
labelName: newLabelName2, labelName: newLabelName2,
pointsMap: [ pointsMap: [
{ x: 700, y: 200 } { x: 700, y: 200 }
@ -72,7 +70,6 @@ context('Lock/hide features.', () => {
const createRectangleShape4Points = { const createRectangleShape4Points = {
points: 'By 4 Points', points: 'By 4 Points',
type: 'Shape', type: 'Shape',
switchLabel: true,
labelName: newLabelName3, labelName: newLabelName3,
firstX: 550, firstX: 550,
firstY: 350, firstY: 350,
@ -86,7 +83,6 @@ context('Lock/hide features.', () => {
const createPolygonTrack = { const createPolygonTrack = {
reDraw: false, reDraw: false,
type: 'Track', type: 'Track',
switchLabel: true,
labelName: newLabelName4, labelName: newLabelName4,
pointsMap: [ pointsMap: [
{ x: 700, y: 350 }, { x: 700, y: 350 },

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Actions on rectangle', () => { context('Actions on rectangle', () => {
const caseId = '8'; const caseId = '8';
@ -12,7 +12,7 @@ context('Actions on rectangle', () => {
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,
@ -21,7 +21,7 @@ context('Actions on rectangle', () => {
const createRectangleShape4Points = { const createRectangleShape4Points = {
points: 'By 4 Points', points: 'By 4 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 400, firstX: 400,
firstY: 350, firstY: 350,
secondX: 500, secondX: 500,
@ -34,7 +34,7 @@ context('Actions on rectangle', () => {
const createRectangleTrack2Points = { const createRectangleTrack2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: createRectangleShape2Points.firstX, firstX: createRectangleShape2Points.firstX,
firstY: createRectangleShape2Points.firstY - 150, firstY: createRectangleShape2Points.firstY - 150,
secondX: createRectangleShape2Points.secondX, secondX: createRectangleShape2Points.secondX,
@ -43,7 +43,7 @@ context('Actions on rectangle', () => {
const createRectangleTrack4Points = { const createRectangleTrack4Points = {
points: 'By 4 Points', points: 'By 4 Points',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: createRectangleShape4Points.firstX, firstX: createRectangleShape4Points.firstX,
firstY: createRectangleShape4Points.firstY - 150, firstY: createRectangleShape4Points.firstY - 150,
secondX: createRectangleShape4Points.secondX - 100, secondX: createRectangleShape4Points.secondX - 100,
@ -57,7 +57,6 @@ context('Actions on rectangle', () => {
labelName: newLabelName, labelName: newLabelName,
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: true,
firstX: createRectangleShape2Points.firstX, firstX: createRectangleShape2Points.firstX,
firstY: createRectangleShape2Points.firstY + 150, firstY: createRectangleShape2Points.firstY + 150,
secondX: createRectangleShape2Points.secondX, secondX: createRectangleShape2Points.secondX,
@ -67,7 +66,6 @@ context('Actions on rectangle', () => {
labelName: newLabelName, labelName: newLabelName,
points: 'By 4 Points', points: 'By 4 Points',
type: 'Shape', type: 'Shape',
switchLabel: true,
firstX: createRectangleShape4Points.firstX, firstX: createRectangleShape4Points.firstX,
firstY: createRectangleShape4Points.firstY + 150, firstY: createRectangleShape4Points.firstY + 150,
secondX: createRectangleShape4Points.secondX, secondX: createRectangleShape4Points.secondX,

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Actions on Cuboid', () => { context('Actions on Cuboid', () => {
const caseId = '9'; const caseId = '9';
@ -12,7 +12,7 @@ context('Actions on Cuboid', () => {
const createCuboidShape2Points = { const createCuboidShape2Points = {
points: 'From rectangle', points: 'From rectangle',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,
@ -21,7 +21,7 @@ context('Actions on Cuboid', () => {
const createCuboidShape4Points = { const createCuboidShape4Points = {
points: 'By 4 Points', points: 'By 4 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 400, firstX: 400,
firstY: 350, firstY: 350,
secondX: 500, secondX: 500,
@ -34,7 +34,7 @@ context('Actions on Cuboid', () => {
const createCuboidTrack2Points = { const createCuboidTrack2Points = {
points: 'From rectangle', points: 'From rectangle',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: createCuboidShape2Points.firstX, firstX: createCuboidShape2Points.firstX,
firstY: createCuboidShape2Points.firstY - 150, firstY: createCuboidShape2Points.firstY - 150,
secondX: createCuboidShape2Points.secondX, secondX: createCuboidShape2Points.secondX,
@ -43,7 +43,7 @@ context('Actions on Cuboid', () => {
const createCuboidTrack4Points = { const createCuboidTrack4Points = {
points: 'By 4 Points', points: 'By 4 Points',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: createCuboidShape4Points.firstX, firstX: createCuboidShape4Points.firstX,
firstY: createCuboidShape4Points.firstY - 150, firstY: createCuboidShape4Points.firstY - 150,
secondX: createCuboidShape4Points.secondX - 100, secondX: createCuboidShape4Points.secondX - 100,
@ -57,7 +57,6 @@ context('Actions on Cuboid', () => {
labelName: newLabelName, labelName: newLabelName,
points: 'From rectangle', points: 'From rectangle',
type: 'Shape', type: 'Shape',
switchLabel: true,
firstX: createCuboidShape2Points.firstX, firstX: createCuboidShape2Points.firstX,
firstY: createCuboidShape2Points.firstY + 150, firstY: createCuboidShape2Points.firstY + 150,
secondX: createCuboidShape2Points.secondX, secondX: createCuboidShape2Points.secondX,
@ -67,7 +66,6 @@ context('Actions on Cuboid', () => {
labelName: newLabelName, labelName: newLabelName,
points: 'By 4 Points', points: 'By 4 Points',
type: 'Shape', type: 'Shape',
switchLabel: true,
firstX: createCuboidShape4Points.firstX, firstX: createCuboidShape4Points.firstX,
firstY: createCuboidShape4Points.firstY + 150, firstY: createCuboidShape4Points.firstY + 150,
secondX: createCuboidShape4Points.secondX, secondX: createCuboidShape4Points.secondX,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <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', () => { context('Check if UI not fails with shape dragging over sidebar', () => {
const issueId = '1216'; const issueId = '1216';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,
@ -20,7 +20,7 @@ context('Check if UI not fails with shape dragging over sidebar', () => {
const createRectangleShape2PointsSecond = { const createRectangleShape2PointsSecond = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: createRectangleShape2Points.firstX, firstX: createRectangleShape2Points.firstX,
firstY: createRectangleShape2Points.firstY - 150, firstY: createRectangleShape2Points.firstY - 150,
secondX: createRectangleShape2Points.secondX, secondX: createRectangleShape2Points.secondX,

@ -4,13 +4,13 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Points track it is still invisible on next frames', () => { context('Points track it is still invisible on next frames', () => {
const issueId = '1368'; const issueId = '1368';
const createPointsTrack = { const createPointsTrack = {
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [{ x: 300, y: 410 }], pointsMap: [{ x: 300, y: 410 }],
complete: true, complete: true,
numberOfPoints: null, numberOfPoints: null,

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('When delete a point, the required point is deleted.', () => { context('When delete a point, the required point is deleted.', () => {
const issueId = '1391'; const issueId = '1391';
@ -12,7 +12,7 @@ context('When delete a point, the required point is deleted.', () => {
let pointsСoordinatesAfterDeletePoint = []; let pointsСoordinatesAfterDeletePoint = [];
const createPolylinesShape = { const createPolylinesShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 309, y: 250 }, { x: 309, y: 250 },
{ x: 309, y: 350 }, { x: 309, y: 350 },

@ -12,7 +12,7 @@ context('The highlighted attribute in AAM should correspond to the chosen attrib
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -4,16 +4,15 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Check if the new label reflects in the options', () => { context('Check if the new label reflects in the options', () => {
const issueId = '1429'; const issueId = '1429';
const labelName = `Issue ${issueId}`;
const newLabelName = `New ${labelName}`; const newLabelName = `New ${labelName}`;
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Check hide functionality (H)', () => { context('Check hide functionality (H)', () => {
const issueId = '1433'; const issueId = '1433';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Cancel "multiple paste". UI is not locked.', () => { context('Cancel "multiple paste". UI is not locked.', () => {
const issueId = '1438'; const issueId = '1438';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -11,7 +11,7 @@ context('Information about a blocked object disappears if hover the cursor over
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,
@ -20,7 +20,7 @@ context('Information about a blocked object disappears if hover the cursor over
const createRectangleShape2PointsSecond = { const createRectangleShape2PointsSecond = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: createRectangleShape2Points.firstX, firstX: createRectangleShape2Points.firstX,
firstY: createRectangleShape2Points.firstY - 150, firstY: createRectangleShape2Points.firstY - 150,
secondX: createRectangleShape2Points.secondX, secondX: createRectangleShape2Points.secondX,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Filter property "shape" work correctly', () => { context('Filter property "shape" work correctly', () => {
const issueId = '1444'; const issueId = '1444';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,
@ -20,7 +20,7 @@ context('Filter property "shape" work correctly', () => {
const createPolygonShape = { const createPolygonShape = {
reDraw: false, reDraw: false,
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 300, y: 100 }, { x: 300, y: 100 },
{ x: 400, y: 400 }, { x: 400, y: 400 },

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context('Dump annotation if cuboid created', () => { context('Dump annotation if cuboid created', () => {
const issueId = '1568'; const issueId = '1568';
const createCuboidShape2Points = { const createCuboidShape2Points = {
points: 'From rectangle', points: 'From rectangle',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 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 = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 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 = { const createRectangleShape2PointsSecond = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: createRectangleShape2Points.firstX, firstX: createRectangleShape2Points.firstX,
firstY: createRectangleShape2Points.firstY - 150, firstY: createRectangleShape2Points.firstY - 150,
secondX: createRectangleShape2Points.secondX, secondX: createRectangleShape2Points.secondX,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName, advancedConfigurationParams } from '../../support/const'; import { taskName, advancedConfigurationParams, labelName } from '../../support/const';
context('Check propagation work from the latest frame', () => { context('Check propagation work from the latest frame', () => {
const issueId = '1785'; const issueId = '1785';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <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', () => { context('First part of a splitted track is visible', () => {
const issueId = '1819'; const issueId = '1819';
const createRectangleTrack2Points = { const createRectangleTrack2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName } from '../../support/const'; import { taskName, labelName } from '../../support/const';
context( context(
"Hidden objects mustn't consider when we want to group visible objects only and use an grouping area for it.", "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 = ''; let bgcolor = '';
const createFirstPointsShape = { const createFirstPointsShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [{ x: 300, y: 410 }], pointsMap: [{ x: 300, y: 410 }],
complete: true, complete: true,
numberOfPoints: null, numberOfPoints: null,
}; };
const createSecondPointsShape = { const createSecondPointsShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [{ x: 350, y: 410 }], pointsMap: [{ x: 350, y: 410 }],
complete: true, complete: true,
numberOfPoints: null, numberOfPoints: null,
}; };
const createThridPointsShape = { const createThridPointsShape = {
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
pointsMap: [{ x: 400, y: 410 }], pointsMap: [{ x: 400, y: 410 }],
complete: true, complete: true,
numberOfPoints: null, numberOfPoints: null,

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName, textDefaultValue, attrName } from '../../support/const'; import { taskName, textDefaultValue, attrName, labelName } from '../../support/const';
context( context(
"Checks that the cursor doesn't automatically jump to the end of a word when the attribute value changes", "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 = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <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.", () => { context("The points of the previous polygon mustn't appear while polygon's interpolation.", () => {
const issueId = '1882'; const issueId = '1882';
const createPolygonTrack = { const createPolygonTrack = {
reDraw: false, reDraw: false,
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 309, y: 431 }, { x: 309, y: 431 },
{ x: 360, y: 500 }, { x: 360, y: 500 },
@ -23,7 +23,7 @@ context("The points of the previous polygon mustn't appear while polygon's inter
const reDrawPolygonTrack = { const reDrawPolygonTrack = {
reDraw: true, reDraw: true,
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 359, y: 431 }, { x: 359, y: 431 },
{ x: 410, y: 500 }, { x: 410, y: 500 },

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <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.", () => { context("Point coordinates are not duplicated while polygon's interpolation.", () => {
const issueId = '1886'; const issueId = '1886';
@ -12,7 +12,7 @@ context("Point coordinates are not duplicated while polygon's interpolation.", (
const createPolygonTrack = { const createPolygonTrack = {
reDraw: false, reDraw: false,
type: 'Track', type: 'Track',
switchLabel: false, labelName: labelName,
pointsMap: [ pointsMap: [
{ x: 300, y: 450 }, { x: 300, y: 450 },
{ x: 400, y: 450 }, { x: 400, y: 450 },

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import { taskName, textDefaultValue, attrName } from '../../support/const'; import { taskName, textDefaultValue, attrName, labelName } from '../../support/const';
context('Check label attribute changes', () => { context('Check label attribute changes', () => {
const issueId = '1919'; const issueId = '1919';
@ -12,7 +12,7 @@ context('Check label attribute changes', () => {
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -4,14 +4,14 @@
/// <reference types="cypress" /> /// <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', () => { context('Check if the UI fails by moving to the next frame while dragging the object', () => {
const prId = '1370'; const prId = '1370';
const createRectangleShape2Points = { const createRectangleShape2Points = {
points: 'By 2 Points', points: 'By 2 Points',
type: 'Shape', type: 'Shape',
switchLabel: false, labelName: labelName,
firstX: 250, firstX: 250,
firstY: 350, firstY: 350,
secondX: 350, secondX: 350,

@ -96,9 +96,7 @@ Cypress.Commands.add('openTaskJob', (taskName, jobNumber = 0) => {
Cypress.Commands.add('createRectangle', (createRectangleParams) => { Cypress.Commands.add('createRectangle', (createRectangleParams) => {
cy.get('.cvat-draw-rectangle-control').click(); 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') cy.contains('Draw new rectangle')
.parents('.cvat-draw-shape-popover-content') .parents('.cvat-draw-shape-popover-content')
.within(() => { .within(() => {
@ -123,7 +121,7 @@ Cypress.Commands.add('switchLabel', (labelName, objectType) => {
cy.contains(regex).parents('.cvat-draw-shape-popover-content').within(() => { cy.contains(regex).parents('.cvat-draw-shape-popover-content').within(() => {
cy.get('.ant-select-selection-selected-value').click(); 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) => { Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) => {
@ -146,9 +144,7 @@ Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) =>
Cypress.Commands.add('createPoint', (createPointParams) => { Cypress.Commands.add('createPoint', (createPointParams) => {
cy.get('.cvat-draw-points-control').click(); 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') cy.contains('Draw new points')
.parents('.cvat-draw-shape-popover-content') .parents('.cvat-draw-shape-popover-content')
.within(() => { .within(() => {
@ -190,9 +186,7 @@ Cypress.Commands.add('shapeGrouping', (firstX, firstY, lastX, lastY) => {
Cypress.Commands.add('createPolygon', (createPolygonParams) => { Cypress.Commands.add('createPolygon', (createPolygonParams) => {
if (!createPolygonParams.reDraw) { if (!createPolygonParams.reDraw) {
cy.get('.cvat-draw-polygon-control').click(); 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') cy.contains('Draw new polygon')
.parents('.cvat-draw-shape-popover-content') .parents('.cvat-draw-shape-popover-content')
.within(() => { .within(() => {
@ -242,16 +236,14 @@ Cypress.Commands.add('changeLabelAAM', (labelName) => {
cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { cy.get('.attribute-annotation-sidebar-basics-editor').within(() => {
cy.get('.ant-select-selection').click(); 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) => { Cypress.Commands.add('createCuboid', (createCuboidParams) => {
cy.get('.cvat-draw-cuboid-control').click(); 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') cy.contains('Draw new cuboid')
.parents('.cvat-draw-shape-popover-content') .parents('.cvat-draw-shape-popover-content')
.within(() => { .within(() => {
@ -280,9 +272,7 @@ Cypress.Commands.add('updateAttributes', (multiAttrParams) => {
Cypress.Commands.add('createPolyline', (createPolylineParams) => { Cypress.Commands.add('createPolyline', (createPolylineParams) => {
cy.get('.cvat-draw-polyline-control').click(); 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') cy.contains('Draw new polyline')
.parents('.cvat-draw-shape-popover-content') .parents('.cvat-draw-shape-popover-content')
.within(() => { .within(() => {

Loading…
Cancel
Save