feat(services): add services menu item to sidebar and update related components
This commit is contained in:
@@ -41,3 +41,23 @@ describe('Sidebar — expandable نوبتها menu', () => {
|
||||
expect(screen.getByText('نوبت های تایید شده')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Sidebar — خدمات در منوی اصلی (نه تنظیمات)', () => {
|
||||
it('shows خدمات in the clinic main menu linking to /admin/clinic-services', () => {
|
||||
useAuthStore.setState({
|
||||
primaryRole: 'clinic', dbUuid: 'c1', userName: 'کلینیک',
|
||||
availableContexts: [], context: null,
|
||||
} as any);
|
||||
renderWithProviders(<Sidebar />, { route: '/admin/dashboard' });
|
||||
expect(screen.getByText('سرویس ها').closest('a')).toHaveAttribute('href', '/admin/clinic-services');
|
||||
});
|
||||
|
||||
it('shows خدمات in the doctor main menu linking to /admin/clinic-services', () => {
|
||||
useAuthStore.setState({
|
||||
primaryRole: 'doctor', dbUuid: null, userName: 'پزشک',
|
||||
availableContexts: [], context: null,
|
||||
} as any);
|
||||
renderWithProviders(<Sidebar />, { route: '/admin/dashboard' });
|
||||
expect(screen.getByText('سرویس ها').closest('a')).toHaveAttribute('href', '/admin/clinic-services');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user