Skip to content

Commit

Permalink
Wait for scorlling into view before clicking element from three-dot-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomTannenbaum committed Nov 19, 2024
1 parent 22a3a33 commit d5b6581
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frontend/cypress/support/helper/pom-helper/pages/overviewPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ export default class CyOverviewPage extends Page {

selectFromThreeDotMenu(optionName: string) {
cy.contains(optionName).should('exist');
const chainable = cy.get('.objective-three-dot-menu').contains(optionName).scrollIntoView();
chainable.should('have.class', 'objective-menu-option');
chainable.click();
const chainable = cy
.get('.objective-three-dot-menu')
.contains(optionName)
.scrollIntoView()
.then(() => {
chainable.should('have.class', 'objective-menu-option');
chainable.click();
});
}

duplicateObjective(objectiveName: string) {
Expand Down

0 comments on commit d5b6581

Please sign in to comment.