Update manifest.json with new mtime and ast_hash for AppointmentsPage and AppointmentBookingModal test

This commit is contained in:
hamed
2026-07-23 15:13:38 +03:30
parent 0edaf6518f
commit 36f13ac7d3
5 changed files with 307 additions and 325 deletions
@@ -154,24 +154,32 @@ describe('NewAppointmentModal — هزینه ویزیت', () => {
await waitFor(() =>
expect(get).toHaveBeenCalledWith('/api/v1/insurance-pricing?doctor_uuid=doc1'));
// اختیاری → کلپس بسته است؛ باز کردن آن تا فیلد دیده شود
fireEvent.click(screen.getByRole('button', { name: /هزینه ویزیت/ }));
// ۲٬۱۲۰٬۰۰۰ ریال = ۲۱۲٬۰۰۰ تومان
await waitFor(() => expect(screen.getByPlaceholderText('0')).toHaveValue('۲۱۲٬۰۰۰'));
});
it('بدون تعرفه، فیلد صفر می‌ماند و اختیاری است', async () => {
it('هزینه ویزیت اختیاری در کلپسِ بسته است و با کلیک باز می‌شود', async () => {
mockPricing(0);
renderWithProviders(<NewAppointmentModal slot={slot} onClose={() => {}} onSuccess={() => {}} />);
// برچسب اختیاری همیشه در سرِ کلپس هست، ولی فیلد در ابتدا پنهان است
expect(screen.getByText('(اختیاری)')).toBeInTheDocument();
expect(screen.queryByPlaceholderText('0')).toBeNull();
fireEvent.click(screen.getByRole('button', { name: /هزینه ویزیت/ }));
await screen.findByText(/تعرفه‌ای ثبت نشده/);
expect(screen.getByPlaceholderText('0')).toHaveValue('');
expect(screen.getByText('(اختیاری)')).toBeInTheDocument();
});
it('با الزامی بودن هزینه ویزیت و مبلغ صفر، ثبت غیرفعال است', async () => {
it('با الزامی بودن هزینه ویزیت، کلپس باز است و مبلغ صفر ثبت را غیرفعال می‌کند', async () => {
mockPricing(0, true);
renderWithProviders(<NewAppointmentModal slot={slot} onClose={() => {}} onSuccess={() => {}} />);
// الزامی → بدون کلیک، فیلد و خطا نمایش داده می‌شوند
await screen.findByText('هزینه ویزیت الزامی است');
expect(screen.getByPlaceholderText('0')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'ثبت نوبت' })).toBeDisabled();
});
});