forked from cardosofelipe/fast-next-template
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:
@@ -60,7 +60,7 @@ describe('UserStatusChart', () => {
|
||||
render(<UserStatusChart />);
|
||||
|
||||
expect(screen.getByText('User Status Distribution')).toBeInTheDocument();
|
||||
expect(screen.getByTestId('responsive-container')).toBeInTheDocument();
|
||||
expect(screen.getByText('No user status data available')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('shows loading state', () => {
|
||||
@@ -86,7 +86,7 @@ describe('UserStatusChart', () => {
|
||||
render(<UserStatusChart data={[]} />);
|
||||
|
||||
expect(screen.getByText('User Status Distribution')).toBeInTheDocument();
|
||||
expect(screen.getByTestId('responsive-container')).toBeInTheDocument();
|
||||
expect(screen.getByText('No user status data available')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
describe('renderLabel function', () => {
|
||||
|
||||
Reference in New Issue
Block a user