1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00
portainer/app/react/components/buttons/AddButton.test.tsx

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

19 lines
471 B
TypeScript
Raw Normal View History

import { render } from '@/react-tools/test-utils';
import { AddButton } from './AddButton';
function renderDefault({
label = 'default label',
}: Partial<{ label: string }> = {}) {
return render(<AddButton to="">{label}</AddButton>);
}
test('should display a AddButton component', async () => {
const label = 'test label';
const { findByText } = renderDefault({ label });
const buttonLabel = await findByText(label);
expect(buttonLabel).toBeTruthy();
});