Files
clinicpro/assets/admin/pages/SettingsMenuPage.test.tsx
T
hamedandClaude Opus 4.8 0b3aed0813 feat(settings): render doctor/clinic settings pages inside the settings shell
Wrap the existing settings-area pages — doctor profile (مدیریت پزشک),
insurance pricing (بیمه), payment report (پرداخت), SMS wallet (پیامک‌ها),
secretaries (منشی) and clinic info (مطب) — in SettingsLayout so they appear
under the settings sub-navigation like the Figma design, with the matching
menu item highlighted. Wire the doctor/clinic menu entries to their routes.

The نوبت‌دهی / برچسب‌ها / حساب کاربری entries stay as disabled placeholders
until they have their own pages/designs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 13:44:02 +03:30

23 lines
931 B
TypeScript

import { describe, it, expect } from 'vitest';
import { screen } from '@testing-library/react';
import { renderWithProviders } from '../test/utils';
import SettingsMenuPage from './SettingsMenuPage';
import { SETTINGS_MENU } from '../components/layout/SettingsLayout';
describe('SettingsMenuPage', () => {
it('lists every settings section', () => {
renderWithProviders(<SettingsMenuPage />);
for (const item of SETTINGS_MENU) {
expect(screen.getByText(item.label)).toBeInTheDocument();
}
});
it('links implemented sections and disables the rest', () => {
renderWithProviders(<SettingsMenuPage />);
// implemented → anchor with href
expect(screen.getByText('خرید اشتراک').closest('a')).toHaveAttribute('href', '/admin/subscription');
// not implemented → disabled button
expect(screen.getByText('مدیریت نوبت دهی').closest('button')).toBeDisabled();
});
});