From 0f6e42ec64aaf0e7c7d6da9a14996061cb60407c Mon Sep 17 00:00:00 2001 From: Kruchinin Date: Mon, 9 Nov 2020 18:50:26 +0300 Subject: [PATCH] Cypress test for issue 2603. --- ...03_ui_not_throw_error_specify_one_point.js | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/cypress/integration/actions_tasks_objects/issue_2603_ui_not_throw_error_specify_one_point.js diff --git a/tests/cypress/integration/actions_tasks_objects/issue_2603_ui_not_throw_error_specify_one_point.js b/tests/cypress/integration/actions_tasks_objects/issue_2603_ui_not_throw_error_specify_one_point.js new file mode 100644 index 00000000..477d0e90 --- /dev/null +++ b/tests/cypress/integration/actions_tasks_objects/issue_2603_ui_not_throw_error_specify_one_point.js @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: MIT + +/// + +import { taskName } from '../../support/const'; + +context('Draw a point shape, specify one point', () => { + const issueId = '2306'; + const createPointsShape = { + type: 'Shape', + switchLabel: false, + pointsMap: [ + { x: 500, y: 200 }, + ], + numberOfPoints: 1, + }; + + before(() => { + cy.openTaskJob(taskName); + }); + + describe(`Testing case "${issueId}"`, () => { + it('Draw a point shape, specify one point. Drag cursor.', () => { + cy.createPoint(createPointsShape); + cy.get('.cvat-canvas-container').trigger('mousemove'); + // Test fail before fix with error: + // The following error originated from your application code, not from Cypress. + // > Cannot read property 'each' of undefined. + }); + }); +});