Update Cypress test. Add issue as point for check issue 2633. (#2760)

main
Dmitry Kruchinin 5 years ago committed by GitHub
parent 7348a9586a
commit 3d4fad4c1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,15 +1,15 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
context("Some parts of the Redux state (issues) isn't reset after chaning a task.", () => {
const issueId = '2524';
const labelName = `Case ${issueId}`;
const issueId = '2524_2633';
const labelName = `Issue ${issueId}`;
const taskName = {
firstTaskName: 'First task issue 2524',
secondTaskName: 'Second task issue 2524',
firstTaskName: `First task issue ${issueId}`,
secondTaskName: `Second task issue ${issueId}`,
};
const attrName = `Attr for ${labelName}`;
const textDefaultValue = 'Some default value for type Text';
@ -33,6 +33,12 @@ context("Some parts of the Redux state (issues) isn't reset after chaning a task
secondX: 650,
secondY: 200,
};
const createIssuePoint = {
type: 'point',
description: 'point issue',
firstX: 500,
firstY: 300,
};
before(() => {
cy.clearLocalStorageSnapshot();
@ -83,9 +89,10 @@ context("Some parts of the Redux state (issues) isn't reset after chaning a task
cy.url().should('include', '/tasks');
});
it('Open job again and create an issue', () => {
it('Open job again and create an issue. Check issue 2633.', () => {
cy.openJob();
cy.createIssueFromControlButton(createIssueRectangle);
cy.createIssueFromControlButton(createIssuePoint); // Issue 2633
});
it('Open the second task. Open job. Issue not exist.', () => {

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -120,7 +120,9 @@ Cypress.Commands.add('createIssueFromControlButton', (createIssueParams) => {
.trigger('mousemove', createIssueParams.secondX, createIssueParams.secondY)
.trigger('mouseup');
} else if (createIssueParams.type === 'point') {
cy.get('.cvat-canvas-container').click(createIssueParams.firstX, createIssueParams.firstY);
cy.get('.cvat-canvas-container')
.trigger('mousedown', createIssueParams.firstX, createIssueParams.firstY, { button: 0 })
.trigger('mouseup');
}
cy.get('.cvat-create-issue-dialog').within(() => {
cy.get('#issue_description').type(createIssueParams.description);

Loading…
Cancel
Save