Skip to content

Commit

Permalink
e2e(datahub): more efficiently open dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jahow committed Apr 11, 2024
1 parent 8a17994 commit 85cb4ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/e2e/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ Cypress.Commands.add(
{ prevSubject: true },
(dropdownElement) => {
cy.get('body').click('bottomLeft') // first click on the document to close other dropdowns
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
cy.wrap(dropdownElement).find('button').click()
return cy.get('.cdk-overlay-container').find('[role=listbox]')
}
)
Expand Down

0 comments on commit 85cb4ee

Please sign in to comment.