From cb4d8e6ee571594f74ff96bc6cbc7c597c732e4a Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Mon, 7 Sep 2020 09:30:04 +0300 Subject: [PATCH] Cypress test for issue 1825. (#2124) Co-authored-by: Dmitry Kruchinin --- .../issue_1825_tooltip_hidden_mouseout.js | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tests/cypress/integration/issue_1825_tooltip_hidden_mouseout.js diff --git a/tests/cypress/integration/issue_1825_tooltip_hidden_mouseout.js b/tests/cypress/integration/issue_1825_tooltip_hidden_mouseout.js new file mode 100644 index 00000000..b8f81ca0 --- /dev/null +++ b/tests/cypress/integration/issue_1825_tooltip_hidden_mouseout.js @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2020 Intel Corporation + * + * SPDX-License-Identifier: MIT + */ + +/// + +context('Tooltip does not interfere with interaction with elements.', () => { + + const issueId = '1825' + 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) + }) + + describe(`Testing issue "${issueId}"`, () => { + it('Mouseover to "Shape" button when draw new rectangle. The tooltip open.', () => { + cy.get('.cvat-draw-rectangle-control').click() + cy.get('.cvat-draw-shape-popover-content') + cy.contains('Shape') + .invoke('show') + .trigger('mouseover', 'top') + .should('have.class', 'ant-tooltip-open') + }) + it('The radio element was clicked successfully', () => { + /*Before the fix, cypress can't click on the radio element + due to its covered with the tooltip. After the fix, cypress + successfully clicks on the element, but the tooltip does not + disappear visually.*/ + cy.contains('By 4 Points') + .click() + }) + }) +})