import { render, screen } from '@testing-library/react';
import { CodeBlockAction } from '../CodeBlockAction';
import styles from '@patternfly/react-styles/css/components/CodeBlock/code-block';
test('CodeBlockAction renders', () => {
render(action);
expect(screen.getByText('action')).toBeVisible();
});
test(`CodeBlockAction renders with class ${styles.codeBlockActions}-item by default`, () => {
render(Test);
expect(screen.getByText('Test')).toHaveClass(`${styles.codeBlockActions}-item`);
});
test('CodeBlockAction renders with custom class', () => {
render(Test);
expect(screen.getByText('Test')).toHaveClass('tester');
});
test('Matches the snapshot', () => {
const { asFragment } = render(children);
expect(asFragment()).toMatchSnapshot();
});