Skip to content

Commit

Permalink
getByRole tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dlnr committed Feb 15, 2024
1 parent 191aca5 commit e396ee7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/react/src/Tabs/Tabs.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ import '@testing-library/jest-dom'

describe('Tabs', () => {
it('renders', () => {
const { container } = render(<Tabs />)
render(<Tabs />)

const component = container.querySelector(':only-child')
const component = screen.getByRole('tabs')

expect(component).toBeInTheDocument()
expect(component).toBeVisible()
})

it('renders a design system BEM class name', () => {
const { container } = render(<Tabs />)
render(<Tabs />)

const component = container.querySelector(':only-child')
const component = screen.getByRole('tabs')

expect(component).toHaveClass('amsterdam-tabs')
})

it('renders an additional class name', () => {
const { container } = render(<Tabs className="extra" />)
render(<Tabs className="extra" />)

const component = container.querySelector(':only-child')
const component = screen.getByRole('tabs')

expect(component).toHaveClass('amsterdam-tabs extra')
})
Expand Down

0 comments on commit e396ee7

Please sign in to comment.