Fix cypress command. (#3148)

* Fix cypress command

* Add aditional check for interact with dropdown menu
main
Dmitry Kruchinin 5 years ago committed by GitHub
parent 3a05a74acf
commit c33f77f88d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,7 +59,7 @@ context('Changing a default value for an attribute.', () => {
cy.get(`[cvat-attribute-id="${maxId}"]`).find('.cvat-attribute-values-input').click().wait(500); // Wait for the dropdown menu to transition.
});
});
cy.get('.ant-select-dropdown').within(() => {
cy.get('.ant-select-dropdown').not('.ant-select-dropdown-hidden').within(() => {
cy.contains(new RegExp(`^${newCheckboxValue}$`)).click();
});
cy.contains('[type="submit"]', 'Done').click();

@ -78,7 +78,7 @@ Cypress.Commands.add(
.not('.ant-dropdown-hidden')
.contains('[role="menuitem"]', field)
.trigger('mouseover');
cy.get('.ant-dropdown-menu-sub').contains(label).trigger('mouseover', { force: true });
cy.get('.ant-dropdown-menu-sub').contains(label).trigger('mouseover');
cy.contains('.ant-dropdown-menu-item-only-child', labelAttr).click();
} else {
cy.get('.ant-dropdown').not('.ant-dropdown-hidden').contains('[role="menuitem"]', field).click();

Loading…
Cancel
Save