Add comprehensive tests for RegistrationActivityChart and update empty state assertions

- Added new test suite for `RegistrationActivityChart` covering rendering, loading, empty, and error states.
- Updated existing chart tests (`UserStatusChart`, `OrganizationDistributionChart`, `UserGrowthChart`) to assert correct empty state messages.
- Replaced `SessionActivityChart` references in admin tests with `RegistrationActivityChart`.
This commit is contained in:
Felipe Cardoso
2025-11-24 19:49:41 +01:00
parent 5b0ae54365
commit d47bd34a92
5 changed files with 96 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ describe('OrganizationDistributionChart', () => {
render(<OrganizationDistributionChart />);
expect(screen.getByText('Organization Distribution')).toBeInTheDocument();
expect(screen.getByTestId('responsive-container')).toBeInTheDocument();
expect(screen.getByText('No organization data available')).toBeInTheDocument();
});
it('shows loading state', () => {
@@ -67,6 +67,6 @@ describe('OrganizationDistributionChart', () => {
render(<OrganizationDistributionChart data={[]} />);
expect(screen.getByText('Organization Distribution')).toBeInTheDocument();
expect(screen.getByTestId('responsive-container')).toBeInTheDocument();
expect(screen.getByText('No organization data available')).toBeInTheDocument();
});
});