Skip to content

Commit

Permalink
More reliable test
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Aug 20, 2023
1 parent 417b972 commit 063a557
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,12 +742,14 @@ Cypress.Commands.add('openTaskMenu', (taskName, fromTaskPage) => {

Cypress.Commands.add('clickInTaskMenu', (item, fromTaskPage, taskName = '') => {
cy.openTaskMenu(taskName, fromTaskPage);
cy.get('.cvat-actions-menu')
.should('be.visible')
.find('[role="menuitem"]')
.filter(`:contains("${item}")`)
.last()
.click();
cy.get('.ant-dropdown').not('.ant-dropdown-hidden').within(() => {
cy.get('.cvat-actions-menu')
.should('be.visible')
.find('[role="menuitem"]')
.filter(`:contains("${item}")`)
.last()
.click();
});
});

Cypress.Commands.add('deleteTask', (taskName) => {
Expand Down

0 comments on commit 063a557

Please sign in to comment.