diff --git a/packages/react/src/components/Header/Header.test.e2e.jsx b/packages/react/src/components/Header/Header.test.e2e.jsx index 0a0875b457..b64dd450f4 100644 --- a/packages/react/src/components/Header/Header.test.e2e.jsx +++ b/packages/react/src/components/Header/Header.test.e2e.jsx @@ -237,13 +237,13 @@ describe( .should('not.exist'); cy.findByRole('button', { name: 'open and close list of options' }).click(); - cy.findByRole('menuitem', { name: 'user' }).click(); + cy.findByRole('button', { name: 'user', label: 'user' }).click(); cy.findByText('JohnDoe@ibm.com').should('be.visible'); - cy.findByRole('menuitem', { name: 'user' }) + cy.findByRole('button', { name: 'user', label: 'user' }) .find('svg') .invoke('attr', 'description') .should('eq', 'Close menu'); - cy.findByRole('menuitem', { name: 'user' }).click(); + cy.findByRole('button', { name: 'user', label: 'user' }).click(); cy.findByRole('button', { name: 'open and close list of options' }).should('be.visible'); // click the left side specifically to _not_ click the svg element right in the center