Skip to content

Commit

Permalink
test: add mouseover in menu test
Browse files Browse the repository at this point in the history
There is flakiness in the first test caused by
a mouseover event to the wrong button.
  • Loading branch information
kelsos committed Oct 30, 2024
1 parent ac3b5f7 commit 6a7d1d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions example/cypress/e2e/overlays/menu.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ describe('menu', () => {

cy.get('@defaultMenu').find('[data-cy=activator]').as('activator');
cy.get('@activator').should('be.visible');
cy.get('@activator').trigger('mouseover');
cy.get('@activator').trigger('click');
cy.get('body').find('div[role=menu]').should('be.visible');
cy.get('@activator').trigger('mouseover');
cy.get('@activator').trigger('click');
cy.get('body').find('div[role=menu-content]').should('not.be.visible');

cy.get('@activator').trigger('mouseover');
cy.get('@activator').trigger('click');
cy.get('body').find('div[role=menu-content]').should('be.visible').as('menuContent');
cy.get('@menuContent').trigger('mouseover');
cy.get('@menuContent').trigger('click');
cy.get('body').find('div[role=menu-content]').should('be.visible');
cy.get('@activator').type('{esc}');
Expand Down

0 comments on commit 6a7d1d0

Please sign in to comment.