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 every implemented section', () => {
    renderWithProviders(<SettingsMenuPage />);
    expect(screen.getByText('خرید اشتراک').closest('a')).toHaveAttribute('href', '/admin/subscription');
    expect(screen.getByText('مدیریت نوبت دهی').closest('a')).toHaveAttribute('href', '/admin/appointment-settings');
    expect(screen.getByText('حساب کاربری').closest('a')).toHaveAttribute('href', '/admin/account-settings');
  });
});
