import React from 'react';
import { render, screen } from '@testing-library/react';
import { ProgressHelperText } from '../ProgressHelperText';
test('Renders without children', () => {
render(
);
expect(screen.getByTestId('container').firstChild).toBeVisible();
});
test('Renders children', () => {
render(Test);
expect(screen.getByText('Test')).toBeVisible();
});
test('Renders with class pf-v5-c-progress__helper-text on the div containing the helper text component', () => {
render(Test);
expect(screen.getByText('Test')).toHaveClass('pf-v5-c-progress__helper-text');
});
test('Renders with inherited element props spread to the component', () => {
render(Test);
expect(screen.getByText('Test')).toHaveAccessibleName('Test label');
});
test('Matches the snapshot', () => {
const { asFragment } = render(test);
expect(asFragment()).toMatchSnapshot();
});