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.
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import PasswordResetConfirmPage from '@/app/(auth)/password-reset/confirm/page';
|
||||
import PasswordResetConfirmPage from '@/app/[locale]/(auth)/password-reset/confirm/page';
|
||||
|
||||
// Mock the content component
|
||||
jest.mock('@/app/(auth)/password-reset/confirm/PasswordResetConfirmContent', () => ({
|
||||
jest.mock('@/app/[locale]/(auth)/password-reset/confirm/PasswordResetConfirmContent', () => ({
|
||||
__esModule: true,
|
||||
default: () => <div data-testid="password-reset-confirm-content">Content</div>,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user