import { render, screen } from '@testing-library/react';
import { CompassNavMain } from '../CompassNavMain';
import styles from '@patternfly/react-styles/css/components/Compass/compass';
test('Renders with children', () => {
render(Test content);
expect(screen.getByText('Test content')).toBeVisible();
});
test('Renders with custom class name when className prop is provided', () => {
render(Test);
expect(screen.getByText('Test')).toHaveClass('custom-class');
});
test(`Renders with default ${styles.compassNavMain} class`, () => {
render(Test);
expect(screen.getByText('Test')).toHaveClass(styles.compassNavMain, { exact: true });
});
test('Renders with additional props spread to the component', () => {
render(Test);
expect(screen.getByText('Test')).toHaveAccessibleName('Test label');
});
test('Matches the snapshot', () => {
const { asFragment } = render(
Main tabs content
);
expect(asFragment()).toMatchSnapshot();
});