diff --git a/wp-ict-platform/src/components/common/__tests__/ErrorBoundary.test.tsx b/wp-ict-platform/src/components/common/__tests__/ErrorBoundary.test.tsx index 4bff64a..dd7bb36 100644 --- a/wp-ict-platform/src/components/common/__tests__/ErrorBoundary.test.tsx +++ b/wp-ict-platform/src/components/common/__tests__/ErrorBoundary.test.tsx @@ -97,16 +97,16 @@ describe('ErrorBoundary', () => { // Error boundary should show error UI expect(screen.getByText('Something went wrong')).toBeInTheDocument(); - // Click try again - fireEvent.click(screen.getByText('Try Again')); - - // Re-render with a component that doesn't throw + // Re-render with a component that doesn't throw (parent provides new children) rerender( ); + // Click try again to reset error state + fireEvent.click(screen.getByText('Try Again')); + expect(screen.getByText('No error')).toBeInTheDocument(); });