import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import '@testing-library/jest-dom'; import { TextInputGroupUtilities } from '../TextInputGroupUtilities'; describe('TextInputGroupUtilities', () => { it('renders without children', () => { render(); expect(screen.getByTestId('TextInputGroupUtilities')).toBeVisible(); }); it('renders the children', () => { render({}); expect(screen.getByRole('button', { name: 'Test' })).toBeVisible(); }); it('renders with class pf-v5-c-text-input-group__utilities', () => { render(Test); const utilities = screen.getByText('Test'); expect(utilities).toHaveClass('pf-v5-c-text-input-group__utilities'); }); it('matches the snapshot', () => { const { asFragment } = render({}); expect(asFragment()).toMatchSnapshot(); }); });