Skip to content

Commit

Permalink
test(tabs): fix failed matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
sungik-choi committed Apr 26, 2023
1 parent 12ba23c commit 9e8bde6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/bezier-react/src/components/Tabs/Tabs.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9e8bde6

Please sign in to comment.