Cypress test. Annotation filters help window. (#2701)

* Add css class to annotation filters help window.

* Add cypress test. Annotation filters help window.

* Change context

* Some changes.
main
Dmitry Kruchinin 5 years ago committed by GitHub
parent c62949b3fc
commit c1a11b1de5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -146,6 +146,7 @@ function AnnotationsFiltersInput(props: StateToProps & DispatchToProps): JSX.Ele
width: 700,
title: 'How to use filters?',
content: filtersHelpModalContent(searchForwardShortcut, searchBackwardShortcut),
className: 'cvat-annotations-filters-help-modal-window',
});
}}
onMouseEnter={() => setDropdownVisible(false)}

@ -0,0 +1,33 @@
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
import { taskName } from '../../support/const';
context('Annotation filter help dialog window.', () => {
const issueId = '2690';
before(() => {
cy.openTaskJob(taskName);
});
describe(`Testing issue "${issueId}"`, () => {
it('Open annotation filters help dialog window. The window is visible.', () => {
cy.get('.cvat-annotations-filters-input').within(() => {
// class="ant-select-selection-placeholder" has CSS pointer-events: none
cy.get('.ant-select-selection-placeholder').invoke('css', 'pointer-events', 'auto'); // Replace CSS "pointer-events" to auto
cy.get('[aria-label="filter"]').click();
});
cy.get('.cvat-annotations-filters-help-modal-window').should('exist').and('be.visible');
});
it('Close annotation filters help dialog window. The window is closed.', () => {
cy.get('.cvat-annotations-filters-help-modal-window').within(() => {
cy.contains('button', 'OK').click();
});
cy.get('.cvat-annotations-filters-help-modal-window').should('not.exist');
});
});
});
Loading…
Cancel
Save