fix(appointments): give the resource strip a way back to the doctor

Returning from a resource to the doctor's own booking meant clicking the doctor
tab in the row above, which nobody found. The resource strip now leads with a
"نوبت‌های خود پزشک" tab that clears the resource, so going in and coming back
happen in the same row.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hamed
2026-08-03 13:08:31 +03:30
co-authored by Claude Opus 5
parent 8a53299cc9
commit c688f48583
2 changed files with 21 additions and 2 deletions
@@ -140,6 +140,20 @@ describe('AppointmentsPage — پروفایل کلینیک چندپزشکه', ()
expect(screen.queryByRole('button', { name: 'لیزر CO2' })).toBeNull();
});
/** برگشت از منبع به خودِ پزشک باید در همان نوار باشد، نه با کلیک روی تب بالایی. */
it('تب نخستِ نوار منابع، برگشت به نوبت‌دهی خود پزشک است', async () => {
const user = userEvent.setup();
renderWithProviders(<AppointmentsPage />);
await screen.findByText('دکتر محمدی');
await user.click(await screen.findByRole('button', { name: 'لیزر CO2' }));
expect(await screen.findByText(/نوبت‌دهی این منبع سرویسی است/)).toBeInTheDocument();
await user.click(screen.getByRole('button', { name: 'نوبت‌های خود پزشک' }));
expect(screen.queryByText(/نوبت‌دهی این منبع سرویسی است/)).toBeNull();
});
/** باگ گزارش‌شده: نمای منبع نباید اسلاتی باشد. */
it('نمای منبع سرویسی است و تایم‌لاین اسلاتی ندارد', async () => {
const user = userEvent.setup();