From 9e8bde6d8a3638bf5281b7249660d1b650e80bd2 Mon Sep 17 00:00:00 2001 From: Ed Sungik Choi Date: Wed, 26 Apr 2023 18:37:52 +0900 Subject: [PATCH] test(tabs): fix failed matchers --- packages/bezier-react/src/components/Tabs/Tabs.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bezier-react/src/components/Tabs/Tabs.test.tsx b/packages/bezier-react/src/components/Tabs/Tabs.test.tsx index 0a0af92261..eb7c4e52e0 100644 --- a/packages/bezier-react/src/components/Tabs/Tabs.test.tsx +++ b/packages/bezier-react/src/components/Tabs/Tabs.test.tsx @@ -223,7 +223,7 @@ describe('Tabs', () => { const { getByRole } = renderTabs() const tabItem1 = getByRole('tab', { name: TAB1 }) const tabItem2 = getByRole('tab', { name: TAB2 }) - const tabAction = getByRole('link', { name: ACTION1 }) + const tabAction = getByRole('link') const tabContent = getByRole('tabpanel', { name: TAB1 }) await user.click(getByRole('tab', { name: TAB1 })) @@ -254,10 +254,10 @@ describe('Tabs', () => { describe('Keyboard Navigation', () => { it('can control by arrow right and left key', async () => { const { getByRole } = renderTabs() - const tabItem1 = getByRole('link', { name: ACTION1 }) + const tabItem1 = getByRole('link') const tabItem2 = getByRole('button', { name: ACTION2 }) - await user.click(getByRole('link', { name: ACTION1 })) + await user.click(getByRole('link')) expect(document.activeElement).toBe(tabItem1) await user.keyboard('{arrowright}') expect(document.activeElement).toBe(tabItem2)