From 966f0ad3bff2e57258984bdacb39ff6a241beb17 Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin Date: Wed, 2 Sep 2020 09:46:21 +0300 Subject: [PATCH] Cypress test for issue 1433. --- .../issue_1433_hide_functionality.js | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/cypress/integration/issue_1433_hide_functionality.js diff --git a/tests/cypress/integration/issue_1433_hide_functionality.js b/tests/cypress/integration/issue_1433_hide_functionality.js new file mode 100644 index 000000000000..410c84258fb2 --- /dev/null +++ b/tests/cypress/integration/issue_1433_hide_functionality.js @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2020 Intel Corporation + * + * SPDX-License-Identifier: MIT + */ + +/// + +context('Check hide functionality (H)', () => { + + const issueId = '1433' + const labelName = `Issue ${issueId}` + const taskName = `New annotation task for ${labelName}` + const attrName = `Attr for ${labelName}` + const textDefaultValue = 'Some default value for type Text' + const image = `image_${issueId}.png` + const width = 800 + const height = 800 + const posX = 10 + const posY = 10 + const color = 'gray' + + before(() => { + cy.visit('auth/login') + cy.login() + cy.imageGenerator('cypress/fixtures', image, width, height, color, posX, posY, labelName) + cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, image) + cy.openTaskJob(taskName) + cy.createShape(309, 431, 616, 671) + }) + + describe(`Testing issue "${issueId}"`, () => { + it('Object is hidden', () => { + cy.get('#cvat_canvas_shape_1') + .trigger('mousemove') + .trigger('mouseover') + .trigger('keydown', {key: 'h'}) + .should('be.hidden') + }) + }) +})