Cypress test. Crop polygon properly. (#3048)
parent
90675881dd
commit
d0c30e74a1
@ -0,0 +1,36 @@
|
||||
// Copyright (C) 2020-2021 Intel Corporation
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { taskName, labelName } from '../../support/const';
|
||||
|
||||
context('Crop polygon properly.', () => {
|
||||
const issueId = '2992';
|
||||
|
||||
const createPolygonShape = {
|
||||
reDraw: false,
|
||||
type: 'Shape',
|
||||
labelName: labelName,
|
||||
pointsMap: [
|
||||
{ x: 200, y: 500 },
|
||||
{ x: 200, y: 200 },
|
||||
{ x: 10, y: 250 },
|
||||
],
|
||||
complete: true,
|
||||
numberOfPoints: null,
|
||||
};
|
||||
|
||||
before(() => {
|
||||
cy.openTaskJob(taskName);
|
||||
});
|
||||
|
||||
describe(`Testing issue "${issueId}"`, () => {
|
||||
it('Draw a polygon with vertices outside the image', () => {
|
||||
cy.createPolygon(createPolygonShape);
|
||||
cy.get('.cvat-canvas-container').click(58, 238);
|
||||
cy.get('#cvat_canvas_shape_1').should('have.class', 'cvat_canvas_shape_activated');
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue