1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/app/react/components/buttons/ButtonGroup.test.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
513 B
TypeScript
Raw Normal View History

import { render } from '@testing-library/react';
import { PropsWithChildren } from 'react';
import { ButtonGroup, Props } from './ButtonGroup';
function renderDefault({
size = 'small',
children = 'null',
}: Partial<PropsWithChildren<Props>> = {}) {
return render(<ButtonGroup size={size}>{children}</ButtonGroup>);
}
test('should display a ButtonGroup component', async () => {
const { findByRole } = renderDefault({});
const element = await findByRole('group');
expect(element).toBeTruthy();
});