import { render, screen } from '@testing-library/react';
import { WizardBody } from '../WizardBody';
test('renders children without additional props', () => {
render(content);
expect(screen.getByTestId('test-id')).toHaveTextContent('content');
expect(screen.getByTestId('test-id')).not.toHaveAttribute('aria-label');
expect(screen.getByTestId('test-id')).not.toHaveAttribute('aria-labelledby');
});
test(`Renders with additional classes when className is passed`, () => {
render(
Test
);
expect(screen.getByTestId('test-id')).toHaveClass('custom-class');
});
test('has no padding className when hasNoPadding is not specified', () => {
render(content);
expect(screen.getByText('content')).not.toHaveClass('pf-m-no-padding');
});
test('has padding className when hasNoPadding is specified', () => {
render(content);
expect(screen.getByText('content')).toHaveClass('pf-m-no-padding');
});
test('wrapper element is of type div when component is not specified', () => {
render(
content
);
expect(screen.getByTestId('test-id').tagName).toEqual('DIV');
});
test('renders with custom component', () => {
render(
content
);
expect(screen.getByTestId('test-id').tagName).toEqual('MAIN');
});