Skip to content

Commit

Permalink
test(UsaNavPrimary): fix failing test with outside click event
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcate committed Nov 12, 2024
1 parent a902990 commit 6671292
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/UsaNavPrimary/UsaNavPrimary.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ describe('UsaNavPrimary', () => {

cy.get('@dropdownMenu').should('be.hidden').and('have.attr', 'hidden')

cy.get('@dropdownButton').click()
cy.get('@dropdownButton').click('bottomRight')

cy.get('@dropdownButton').should('have.attr', 'aria-expanded', 'true')

Expand All @@ -554,13 +554,13 @@ describe('UsaNavPrimary', () => {

cy.get('@dropdownMenu').should('be.hidden').and('have.attr', 'hidden')

cy.get('@dropdownButton').click()
cy.get('@dropdownButton').click('bottomRight')

cy.get('@dropdownButton').should('have.attr', 'aria-expanded', 'true')

cy.get('@dropdownMenu').should('be.visible').and('not.have.attr', 'hidden')

cy.get('html').click('topLeft')
cy.get('html').click('bottomRight', { force: true })

cy.get('@dropdownButton').should('have.attr', 'aria-expanded', 'false')

Expand Down

0 comments on commit 6671292

Please sign in to comment.