Skip to content

Commit

Permalink
Fixes on dropdown/menu (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Draier authored Oct 4, 2023
1 parent c9ab177 commit 58203a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jahia/cypress",
"version": "3.17.1",
"version": "3.17.2",
"scripts": {
"build": "tsc",
"lint": "eslint src -c .eslintrc.json --ext .ts"
Expand Down
4 changes: 3 additions & 1 deletion src/page-object/moonstone/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export class Dropdown extends BaseComponent {

select(item: string): Dropdown {
this.get().click();
getComponent(Menu, null, $el => expect($el).to.be.visible).select(item);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
getComponent(Menu, this).select(item);
return this;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/page-object/moonstone/menu.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {BaseComponent} from '../baseComponent';

export class Menu extends BaseComponent {
static defaultSelector = '.moonstone-menu:visible'
static defaultSelector = '.moonstone-menu:not(.moonstone-hidden)'

select(item: string): Menu {
// eslint-disable-next-line cypress/no-unnecessary-waiting
Expand Down

0 comments on commit 58203a6

Please sign in to comment.