Files
fast-next-template/frontend/tests/app/(auth)/password-reset/confirm/page.test.tsx
Felipe Cardoso da021d0640 Update tests and e2e files to support locale-based routing
- Replaced static paths with dynamic locale subpaths (`/[locale]/*`) in imports, URLs, and assertions across tests.
- Updated `next-intl` mocks for improved compatibility with `locale`-aware components.
- Standardized `page.goto` and navigation tests with `/en` as the base locale for consistency.
2025-11-18 23:26:10 +01:00

27 lines
940 B
TypeScript

/**
* Tests for Password Reset Confirm Page
* Verifies Suspense wrapper and fallback
*/
import { render, screen } from '@testing-library/react';
import PasswordResetConfirmPage from '@/app/[locale]/(auth)/password-reset/confirm/page';
// Mock the content component
jest.mock('@/app/[locale]/(auth)/password-reset/confirm/PasswordResetConfirmContent', () => ({
__esModule: true,
default: () => <div data-testid="password-reset-confirm-content">Content</div>,
}));
describe('PasswordResetConfirmPage', () => {
it('renders without crashing', () => {
render(<PasswordResetConfirmPage />);
expect(screen.getByTestId('password-reset-confirm-content')).toBeInTheDocument();
});
it('wraps content in Suspense boundary', () => {
render(<PasswordResetConfirmPage />);
// Content should render successfully (not fallback)
expect(screen.getByTestId('password-reset-confirm-content')).toBeInTheDocument();
});
});