Skip to content

Commit

Permalink
Update packages/react/src/Alert/Alert.test.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Aram <[email protected]>
  • Loading branch information
dlnr and alimpens authored May 14, 2024
1 parent 7f3c89c commit 90aa086
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/react/src/Alert/Alert.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ describe('Alert', () => {
it('renders the close button with a label', () => {
const { container } = render(<Alert closeable={true} closeButtonLabel="Close" />)

const component = container.querySelector(':only-child')
const closeButton = component?.querySelector('.ams-icon-button')
const closeButton = screen.getByRole('button', { name: 'Close' })

expect(closeButton).toHaveTextContent('Close')
expect(closeButton).toBeInTheDocument()
})

it('fires the onClose event when the close button is clicked', () => {
Expand Down

0 comments on commit 90aa086

Please sign in to comment.