From 18dd735627958763c6b0caa5646a8b83c4a41da7 Mon Sep 17 00:00:00 2001 From: Kalyani Raut Date: Thu, 22 Jun 2023 06:52:54 -0400 Subject: [PATCH] chore(suiteheader and headeraction): fix accessibility scan violations #3804 --- packages/react/src/components/Header/Header.test.e2e.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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