From 85cb4eeb96c1dbbc90c580f586b57b3e7f230864 Mon Sep 17 00:00:00 2001 From: Olivia Guyot Date: Thu, 11 Apr 2024 11:09:29 +0200 Subject: [PATCH] e2e(datahub): more efficiently open dropdown --- tools/e2e/commands.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/e2e/commands.ts b/tools/e2e/commands.ts index f4ccc5ba60..b3b5ec3cc6 100644 --- a/tools/e2e/commands.ts +++ b/tools/e2e/commands.ts @@ -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]') } )