Skip to content

Commit

Permalink
e2e: improve custom command for dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
jahow committed Oct 25, 2023
1 parent e565c74 commit 95e7b30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/datahub-e2e/src/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ Cypress.Commands.add(
{ prevSubject: true },
(dropdownElement) => {
cy.get('body').click() // first click on the document to close other dropdowns
cy.wrap(dropdownElement).click('right') // click on the right size to avoid the label
const width = dropdownElement.width()
const height = dropdownElement.height()
cy.wrap(dropdownElement).click(width - 10, height / 2) // click on the right size to avoid the label
return cy.get('.cdk-overlay-container').find('[role=listbox]')
}
)
Expand Down

0 comments on commit 95e7b30

Please sign in to comment.