From 7f69c60fbbc827d2baca27e4623ddafa6fbc92f8 Mon Sep 17 00:00:00 2001 From: onehanddev Date: Tue, 14 Jan 2025 11:02:41 +0530 Subject: [PATCH] fix: replaced tabindex with data-highlighted for tests --- .../src/menu/submenu-trigger/MenuSubmenuTrigger.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.test.tsx b/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.test.tsx index 852cc054bc..05fc9df4c9 100644 --- a/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.test.tsx +++ b/packages/react/src/menu/submenu-trigger/MenuSubmenuTrigger.test.tsx @@ -59,9 +59,9 @@ describe('', () => { submenuItems.forEach((item) => { if (item === submenuItem1) { - expect(item).to.have.attribute('tabindex', '0'); + expect(item).to.have.attribute('data-highlighted'); } else { - expect(item).to.have.attribute('tabindex', '-1'); + expect(item).not.to.have.attribute('data-highlighted'); } }); @@ -70,7 +70,7 @@ describe('', () => { .getAllByRole('menuitem') .filter((item) => item.textContent !== '2.1' && item.textContent !== '2.2'); parentMenuItems.forEach((item) => { - expect(item).not.to.have.attribute('tabindex', '0'); + expect(item).not.to.have.attribute('data-highlighted'); }); }); });