From 3afd7e827878112e6d6bf9a435e7b96d38baaa26 Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Mon, 7 Jun 2021 11:59:10 +0300 Subject: [PATCH] Cypress test. Create an object, save, undo, save, redo, save. (#3299) --- ...case_96_create_save_undo_save_redo_save.js | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/cypress/integration/actions_tasks/case_96_create_save_undo_save_redo_save.js diff --git a/tests/cypress/integration/actions_tasks/case_96_create_save_undo_save_redo_save.js b/tests/cypress/integration/actions_tasks/case_96_create_save_undo_save_redo_save.js new file mode 100644 index 00000000..8fa182ab --- /dev/null +++ b/tests/cypress/integration/actions_tasks/case_96_create_save_undo_save_redo_save.js @@ -0,0 +1,36 @@ +// Copyright (C) 2021 Intel Corporation +// +// SPDX-License-Identifier: MIT + +/// + +import { taskName, labelName } from '../../support/const'; + +context('Create an object, save, undo, save, redo, save.', () => { + const caseId = '96'; + const createRectangleShape2Points = { + points: 'By 2 Points', + type: 'Shape', + labelName: labelName, + firstX: 250, + firstY: 350, + secondX: 350, + secondY: 450, + }; + + before(() => { + cy.openTaskJob(taskName); + }); + + describe(`Testing case "${caseId}"`, () => { + it('Create an object, save, undo, save, redo, save. There should be no error notification.', () => { + cy.createRectangle(createRectangleShape2Points); + cy.saveJob('PATCH', 200, 'saveJobUndoRedo'); + cy.contains('.cvat-annotation-header-button', 'Undo').click(); + cy.saveJob('PATCH', 200, 'saveJobUndoRedo'); + cy.contains('.cvat-annotation-header-button', 'Redo').click(); + cy.saveJob('PATCH', 200, 'saveJobUndoRedo'); + cy.get('.cvat-notification-notice-save-annotations-failed').should('not.exist'); + }); + }); +});