Skip to content

Commit

Permalink
Merge pull request #852 from geonetwork/improve-e2e-test
Browse files Browse the repository at this point in the history
e2e(datahub): more efficiently open dropdown
  • Loading branch information
jahow authored Apr 11, 2024
2 parents 8a17994 + 85cb4ee commit 40043f4
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 40043f4

Please sign in to comment.