turash/bugulma/frontend/components/dashboard/YourContributionSection.test.tsx
2025-12-15 10:06:41 +01:00

23 lines
784 B
TypeScript

import { render, screen } from '@testing-library/react';
import YourContributionSection from './YourContributionSection';
describe('YourContributionSection', () => {
it('renders metrics correctly', () => {
render(
<YourContributionSection
myOrganizations={3}
myProposals={5}
myPendingProposals={1}
t={(k) => k}
/>
);
expect(screen.getByText('dashboard.myOrganizations')).toBeInTheDocument();
expect(screen.getByText('3')).toBeInTheDocument();
expect(screen.getByText('dashboard.myProposals')).toBeInTheDocument();
expect(screen.getByText('5')).toBeInTheDocument();
expect(screen.getByText('dashboard.myPendingProposals')).toBeInTheDocument();
expect(screen.getByText('1')).toBeInTheDocument();
});
});