From 3c0340b1ad805fae927fd072f0174b00f991a4d9 Mon Sep 17 00:00:00 2001 From: Kalyani Raut Date: Fri, 23 Jun 2023 12:47:38 +0530 Subject: [PATCH] chore(suitheader 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 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