/** * Tests for Linked Accounts Settings Page */ import { render, screen } from '@testing-library/react'; import LinkedAccountsPage from '@/app/[locale]/(authenticated)/settings/accounts/page'; // Mock next-intl jest.mock('next-intl', () => ({ useTranslations: () => (key: string) => { const translations: Record = { pageTitle: 'Linked Accounts', pageSubtitle: 'Manage your linked social accounts for quick sign-in', }; return translations[key] || key; }, })); // Mock the LinkedAccountsSettings component jest.mock('@/components/settings', () => ({ LinkedAccountsSettings: () => (
Mocked LinkedAccountsSettings
), })); describe('LinkedAccountsPage', () => { it('renders page title and subtitle', () => { render(); expect(screen.getByText('Linked Accounts')).toBeInTheDocument(); expect( screen.getByText('Manage your linked social accounts for quick sign-in') ).toBeInTheDocument(); }); it('renders LinkedAccountsSettings component', () => { render(); expect(screen.getByTestId('linked-accounts-settings')).toBeInTheDocument(); }); });