diff --git a/packages/react/src/components/Header/Header.test.e2e.jsx b/packages/react/src/components/Header/Header.test.e2e.jsx index 2197aeb638..829b2e9ca1 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.findByTestId('menuitem', { name: 'user', label: 'user' }).click(); + cy.findByRole('menuitem', { name: 'user' }).click(); cy.findByText('JohnDoe@ibm.com').should('be.visible'); - cy.findByRole('menuitem', { name: 'user' }) + cy.findByTestId('menuitem', { name: 'user' }) .find('svg') .invoke('attr', 'description') .should('eq', 'Close menu'); - cy.findByRole('menuitem', { name: 'user' }).click(); + cy.findByTestId('menuitem', { name: '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