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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user