Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan committed Nov 7, 2024
1 parent 0e655cc commit bad01ff
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/react/components/box/test/Box.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {fireEvent, render, screen} from '@testing-library/react'
import { fireEvent, render, screen } from '@testing-library/react'
import * as React from 'react'
import { StatusState } from '../../../objects'
import Box from '../Box'
import {BoxMarkup} from '../BoxProps'
import {BoxContent, BoxFooter, BoxHeader, BoxTableContainer} from '../index'
import { BoxMarkup } from '../BoxProps'
import { BoxContent, BoxFooter, BoxHeader, BoxTableContainer } from '../index'
import BoxItem from '../item'
import {StatusState} from "../../../objects";

describe('Box component', () => {
test('renders without crashing', () => {
Expand Down Expand Up @@ -119,12 +119,10 @@ describe('Box component', () => {
})

test('Should have classes header', () => {
const { getByTestId } = render(
<BoxHeader testId='boxHeader' centered pulledLeft pulledRight variant={StatusState.SUCCESS} help='HELP' />,
)
const { getByTestId } = render(<BoxHeader testId='boxHeader' variant={StatusState.SUCCESS} help='HELP' />)
const boxFooter = getByTestId('boxHeader')
const help = screen.getByTestId('boxHeader-help')
expect(boxFooter).toHaveClass('box-header has-text-centered has-text-left has-text-right has-background-success')
expect(boxFooter).toHaveClass('box-header has-background-success')
expect(help).toBeInTheDocument()
})
})

0 comments on commit bad01ff

Please sign in to comment.