462 lines
19 KiB
TypeScript
462 lines
19 KiB
TypeScript
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
import { screen, fireEvent, waitFor } from '@testing-library/react';
|
|
import { renderWithProviders } from '../../test/utils';
|
|
|
|
vi.mock('../../lib/api', () => ({
|
|
api: { get: vi.fn(), post: vi.fn(), patch: vi.fn(), put: vi.fn(), delete: vi.fn() },
|
|
ApiError: class extends Error {},
|
|
}));
|
|
|
|
import { api } from '../../lib/api';
|
|
import ConfirmAppointmentModal from './ConfirmAppointmentModal';
|
|
|
|
const get = api.get as ReturnType<typeof vi.fn>;
|
|
const post = api.post as ReturnType<typeof vi.fn>;
|
|
|
|
const appointment = {
|
|
uuid: 'a1',
|
|
version: 1,
|
|
patient_name: 'محمد رضایی',
|
|
visit_price_rials: 2_120_000,
|
|
service_items: [{ uuid: 's1', name: 'لیزر', price_rials: 880_000 }],
|
|
};
|
|
|
|
function render() {
|
|
return renderWithProviders(
|
|
<ConfirmAppointmentModal open appointmentUuid="a1" appointment={appointment} onClose={() => {}} />,
|
|
);
|
|
}
|
|
|
|
beforeEach(() => {
|
|
vi.clearAllMocks();
|
|
// payment-methods (pos / bank-accounts) و بقیهٔ GETها
|
|
get.mockResolvedValue({ success: true, data: [] });
|
|
post.mockResolvedValue({ success: true, data: {} });
|
|
});
|
|
|
|
/**
|
|
* فرم ویزارد شد: «بیمه و هزینه» → «پرداخت» → «تأیید».
|
|
* ردیفهای پرداخت در مرحلهٔ دوماند و وضعیت پرداخت در مرحلهٔ سوم.
|
|
*/
|
|
const nextStep = () => fireEvent.click(screen.getByRole('button', { name: 'مرحلهٔ بعد' }));
|
|
|
|
/** همهٔ فیلدهای مبلغ (تومان) در ردیفهای پرداخت — مرحلهٔ «پرداخت». */
|
|
function amountInputs() {
|
|
return screen.getAllByPlaceholderText('0') as HTMLInputElement[];
|
|
}
|
|
|
|
/** از مرحلهٔ «بیمه و هزینه» به «پرداخت» میرود و ردیفهای مبلغ را برمیگرداند. */
|
|
function goToPayment() {
|
|
nextStep();
|
|
return amountInputs();
|
|
}
|
|
|
|
/** تا مرحلهٔ آخر جلو میرود؛ وضعیت پرداخت و دکمهٔ قطعی آنجا هستند. */
|
|
function goToReview() {
|
|
fireEvent.click(screen.getByRole('button', { name: 'مرحلهٔ بعد' }));
|
|
}
|
|
|
|
describe('ConfirmAppointmentModal', () => {
|
|
it('بیمار، اقلام هزینه و جمع کل را نشان میدهد', () => {
|
|
render();
|
|
expect(screen.getByText('محمد رضایی')).toBeInTheDocument();
|
|
expect(screen.getByText('ویزیت')).toBeInTheDocument();
|
|
expect(screen.getByText('لیزر')).toBeInTheDocument();
|
|
expect(screen.getByText('جمع کل')).toBeInTheDocument();
|
|
});
|
|
|
|
it('ردیفِ اول پیشفرض برابر کل هزینه است و وضعیت «تسویه کامل» میشود', () => {
|
|
render();
|
|
// ۳٬۰۰۰٬۰۰۰ ریال = ۳۰۰٬۰۰۰ تومان
|
|
expect(goToPayment()[0]).toHaveValue('۳۰۰٬۰۰۰');
|
|
goToReview();
|
|
expect(screen.getByText('تسویه کامل')).toBeInTheDocument();
|
|
});
|
|
|
|
it('با تغییر دستی مبلغ به کمتر از کل، وضعیت «پرداخت جزئی» میشود', () => {
|
|
render();
|
|
fireEvent.change(goToPayment()[0], { target: { value: '100000' } });
|
|
goToReview();
|
|
expect(screen.getByText('پرداخت جزئی')).toBeInTheDocument();
|
|
});
|
|
|
|
it('دکمهٔ تأیید فقط با مجموعِ بیشتر از جمع کل غیرفعال میشود', () => {
|
|
render();
|
|
const rows = goToPayment();
|
|
|
|
fireEvent.change(rows[0], { target: { value: '9000000' } });
|
|
expect(screen.getByText('مجموع پرداختها از مبلغ قابل پرداخت بیشتر است.')).toBeInTheDocument();
|
|
// پرداختِ بیشتر از مبلغ، حتی جلوی رفتن به مرحلهٔ تأیید را میگیرد.
|
|
expect(screen.getByRole('button', { name: 'مرحلهٔ بعد' })).toBeDisabled();
|
|
|
|
fireEvent.change(rows[0], { target: { value: '100000' } });
|
|
goToReview();
|
|
expect(screen.getByRole('button', { name: 'تأیید و قطعی کردن' })).not.toBeDisabled();
|
|
});
|
|
|
|
it('پرداخت جزئی مجاز است و همان یک روش را ثبت میکند', async () => {
|
|
render();
|
|
fireEvent.change(goToPayment()[0], { target: { value: '100000' } });
|
|
goToReview();
|
|
fireEvent.click(screen.getByRole('button', { name: 'تأیید و قطعی کردن' }));
|
|
|
|
await waitFor(() => expect(post).toHaveBeenCalledWith('/api/v1/appointment/a1/confirm', {
|
|
version: 1,
|
|
payments: [{ method: 'cash', amount_rials: 1_000_000 }],
|
|
}));
|
|
});
|
|
|
|
it('تقسیم پرداخت بین دو روش: مجموع ردیفها بهصورت آرایه ثبت میشود', async () => {
|
|
render();
|
|
// ردیف اول را به ۲۰۰٬۰۰۰ تومان کم میکنیم
|
|
fireEvent.change(goToPayment()[0], { target: { value: '200000' } });
|
|
// افزودن روش دوم — پیشفرض با باقیماندهٔ ۱۰۰٬۰۰۰ تومان پر میشود
|
|
fireEvent.click(screen.getByRole('button', { name: /افزودن روش/ }));
|
|
|
|
const inputs = amountInputs();
|
|
expect(inputs).toHaveLength(2);
|
|
expect(inputs[1]).toHaveValue('۱۰۰٬۰۰۰');
|
|
|
|
// مجموع = ۳۰۰٬۰۰۰ تومان = کل ⇒ تسویه کامل
|
|
goToReview();
|
|
expect(screen.getByText('تسویه کامل')).toBeInTheDocument();
|
|
|
|
fireEvent.click(screen.getByRole('button', { name: 'تأیید و قطعی کردن' }));
|
|
await waitFor(() => expect(post).toHaveBeenCalledWith('/api/v1/appointment/a1/confirm', {
|
|
version: 1,
|
|
payments: [
|
|
{ method: 'cash', amount_rials: 2_000_000 },
|
|
{ method: 'cash', amount_rials: 1_000_000 },
|
|
],
|
|
}));
|
|
});
|
|
|
|
it('حذف ردیف اضافهشده مجموع را دوباره محاسبه میکند', () => {
|
|
render();
|
|
goToPayment();
|
|
fireEvent.click(screen.getByRole('button', { name: /افزودن روش/ }));
|
|
expect(amountInputs()).toHaveLength(2);
|
|
|
|
fireEvent.click(screen.getAllByLabelText('حذف روش پرداخت')[0]);
|
|
expect(amountInputs()).toHaveLength(1);
|
|
});
|
|
});
|
|
|
|
// ── بیمه: نوع خدمت + محاسبهٔ سهم ──────────────────────────────────────────────
|
|
|
|
const CONTRACT = {
|
|
uuid: 'c1', insurance_id: 3, insurance_name: 'بیمه ایران', insurance_kind: 'basic',
|
|
is_active: true, coverage_percent: 70, franchise_percent: 0, annual_ceiling_rials: null,
|
|
category_coverages: { outpatient: 70, inpatient: 30 },
|
|
};
|
|
|
|
/** ویزیت ۵٬۹۵۲٬۰۰۰ ریال، بدون خدمت — سناریوی مرجعِ سهم بیمه. */
|
|
const referenceAppointment = {
|
|
uuid: 'a1', version: 1, patient_name: 'محمد رضایی',
|
|
visit_price_rials: 5_952_000, service_items: [],
|
|
};
|
|
|
|
const SUPP_CONTRACT = {
|
|
uuid: 'c2', insurance_id: 9, insurance_name: 'بیمه آسیا', insurance_kind: 'supplementary',
|
|
is_active: true, coverage_percent: 90, franchise_percent: 10, annual_ceiling_rials: null,
|
|
category_coverages: { outpatient: 90, inpatient: 60 },
|
|
};
|
|
|
|
function mockInsurance(
|
|
categories: { key: string; label: string; enabled: boolean }[],
|
|
freeVisitPriceRials = 0,
|
|
contracts: unknown[] = [CONTRACT],
|
|
) {
|
|
get.mockImplementation((url: string) => {
|
|
if (url === '/api/v1/insurance-pricing') {
|
|
return Promise.resolve({
|
|
success: true,
|
|
data: {
|
|
service_categories: categories,
|
|
free_visit_price_rials: freeVisitPriceRials,
|
|
default_service_category: categories.filter((c) => c.enabled).length === 1
|
|
? categories.find((c) => c.enabled)!.key
|
|
: null,
|
|
},
|
|
});
|
|
}
|
|
if (url === '/api/v1/billing/tenant-insurances') {
|
|
return Promise.resolve({ success: true, data: { data: contracts } });
|
|
}
|
|
return Promise.resolve({ success: true, data: [] });
|
|
});
|
|
}
|
|
|
|
const BOTH = [
|
|
{ key: 'outpatient', label: 'خدمات سرپایی', enabled: true },
|
|
{ key: 'inpatient', label: 'خدمات بستری', enabled: true },
|
|
];
|
|
|
|
function renderReference() {
|
|
return renderWithProviders(
|
|
<ConfirmAppointmentModal open appointmentUuid="a1" appointment={referenceAppointment} onClose={() => {}} />,
|
|
);
|
|
}
|
|
|
|
/**
|
|
* react-select با placeholder بهعنوان aria-label رندر میشود و منو با ArrowDown باز
|
|
* میشود. انتخاب با role=option انجام میشود چون متنِ گزینه در live-region هم تکرار است.
|
|
*/
|
|
async function pick(selectLabel: string, optionText: string) {
|
|
fireEvent.keyDown(screen.getByRole('combobox', { name: selectLabel }), { key: 'ArrowDown' });
|
|
fireEvent.click(await screen.findByRole('option', { name: optionText }));
|
|
}
|
|
|
|
describe('ConfirmAppointmentModal — انتخاب بیمه', () => {
|
|
it('با فعال بودن هر دو نوع، انتخاب نوع خدمت نمایش داده میشود', async () => {
|
|
mockInsurance(BOTH);
|
|
renderReference();
|
|
|
|
expect(await screen.findByText('نوع خدمت')).toBeInTheDocument();
|
|
expect(screen.getByText('بیمه پایه')).toBeInTheDocument();
|
|
});
|
|
|
|
it('با فعال بودن فقط یک نوع، انتخاب نوع خدمت پنهان است', async () => {
|
|
mockInsurance([
|
|
{ key: 'outpatient', label: 'خدمات سرپایی', enabled: true },
|
|
{ key: 'inpatient', label: 'خدمات بستری', enabled: false },
|
|
]);
|
|
renderReference();
|
|
|
|
expect(await screen.findByText('بیمه پایه')).toBeInTheDocument();
|
|
expect(screen.queryByText('نوع خدمت')).not.toBeInTheDocument();
|
|
});
|
|
|
|
it('بدون انتخاب بیمه، مبلغ قابل پرداخت همان جمع کل است', async () => {
|
|
mockInsurance(BOTH);
|
|
renderReference();
|
|
|
|
await screen.findByText('نوع خدمت');
|
|
expect(screen.getByText('مبلغ قابل پرداخت')).toBeInTheDocument();
|
|
expect(screen.queryByText(/سهم بیمه/)).not.toBeInTheDocument();
|
|
});
|
|
|
|
it('با انتخاب بیمه، سهم بیمه و سهم بیمار محاسبه و ارسال میشوند (سرپایی ۷۰٪)', async () => {
|
|
mockInsurance(BOTH);
|
|
renderReference();
|
|
|
|
await screen.findByText('نوع خدمت');
|
|
await pick('انتخاب نوع خدمت', 'خدمات سرپایی');
|
|
await pick('بدون بیمه', 'بیمه ایران');
|
|
|
|
// ۵٬۹۵۲٬۰۰۰ × ۷۰٪ = ۴٬۱۶۶٬۴۰۰ سهم بیمه · ۱٬۷۸۵٬۶۰۰ سهم بیمار
|
|
expect(await screen.findByText('سهم بیمار (قابل پرداخت)')).toBeInTheDocument();
|
|
expect(goToPayment()[0]).toHaveValue('۱۷۸٬۵۶۰');
|
|
|
|
goToReview();
|
|
fireEvent.click(screen.getByRole('button', { name: 'تأیید و قطعی کردن' }));
|
|
await waitFor(() => expect(post).toHaveBeenCalledWith('/api/v1/appointment/a1/confirm', {
|
|
version: 1,
|
|
insurance_service_category: 'outpatient',
|
|
insurance_base_id: 3,
|
|
payments: [{ method: 'cash', amount_rials: 1_785_600 }],
|
|
}));
|
|
});
|
|
|
|
it('بدون قرارداد تکمیلی، انتخاب بیمهٔ تکمیلی نمایش داده نمیشود', async () => {
|
|
mockInsurance(BOTH);
|
|
renderReference();
|
|
|
|
expect(await screen.findByText('بیمه پایه')).toBeInTheDocument();
|
|
expect(screen.queryByText('بیمه تکمیلی')).not.toBeInTheDocument();
|
|
});
|
|
|
|
it('سهم پایه و تکمیلی جدا و زنجیرهای محاسبه میشوند و هر دو ارسال میگردند', async () => {
|
|
mockInsurance(BOTH, 0, [CONTRACT, SUPP_CONTRACT]);
|
|
renderReference();
|
|
|
|
await screen.findByText('نوع خدمت');
|
|
await pick('انتخاب نوع خدمت', 'خدمات سرپایی');
|
|
await pick('بدون بیمه', 'بیمه ایران');
|
|
await pick('بدون بیمه تکمیلی', 'بیمه آسیا');
|
|
|
|
// پایه ۷۰٪ از ۵٬۹۵۲٬۰۰۰ → ۴٬۱۶۶٬۴۰۰؛ باقیمانده ۱٬۷۸۵٬۶۰۰؛
|
|
// تکمیلی ۹۰٪ منهای فرانشیز ۱۰٪ → ۱٬۴۲۸٬۴۸۰؛ سهم بیمار ۳۵۷٬۱۲۰ ریال = ۳۵٬۷۱۲ تومان.
|
|
expect(await screen.findByText(/سهم بیمه پایه/)).toBeInTheDocument();
|
|
expect(screen.getByText(/سهم بیمه تکمیلی/)).toBeInTheDocument();
|
|
nextStep();
|
|
await waitFor(() => expect(amountInputs()[0]).toHaveValue('۳۵٬۷۱۲'));
|
|
|
|
goToReview();
|
|
fireEvent.click(screen.getByRole('button', { name: 'تأیید و قطعی کردن' }));
|
|
await waitFor(() => expect(post).toHaveBeenCalledWith('/api/v1/appointment/a1/confirm', {
|
|
version: 1,
|
|
insurance_service_category: 'outpatient',
|
|
insurance_base_id: 3,
|
|
insurance_supplementary_id: 9,
|
|
payments: [{ method: 'cash', amount_rials: 357_120 }],
|
|
}));
|
|
});
|
|
|
|
it('بیمهٔ تکمیلیِ تنها هم روی کل مبلغ اعمال میشود', async () => {
|
|
mockInsurance(BOTH, 0, [CONTRACT, SUPP_CONTRACT]);
|
|
renderReference();
|
|
|
|
await screen.findByText('نوع خدمت');
|
|
await pick('انتخاب نوع خدمت', 'خدمات سرپایی');
|
|
await pick('بدون بیمه تکمیلی', 'بیمه آسیا');
|
|
|
|
// بدون پایه: ۹۰٪ منهای فرانشیز ۱۰٪ از ۵٬۹۵۲٬۰۰۰ → ۴٬۷۶۱٬۶۰۰؛ بیمار ۱٬۱۹۰٬۴۰۰.
|
|
expect(screen.queryByText(/سهم بیمه پایه/)).not.toBeInTheDocument();
|
|
nextStep();
|
|
await waitFor(() => expect(amountInputs()[0]).toHaveValue('۱۱۹٬۰۴۰'));
|
|
});
|
|
|
|
it('نوبتِ بدون هزینهٔ ویزیت، «قیمت ویزیت آزاد» تنظیمات را نشان میدهد (نه صفر)', async () => {
|
|
mockInsurance(BOTH, 5_952_000);
|
|
renderWithProviders(
|
|
<ConfirmAppointmentModal
|
|
open
|
|
appointmentUuid="a1"
|
|
appointment={{ uuid: 'a1', version: 1, visit_price_rials: null, service_items: [] }}
|
|
onClose={() => {}}
|
|
/>,
|
|
);
|
|
|
|
expect(await screen.findByText('مبلغ قابل پرداخت')).toBeInTheDocument();
|
|
// ۵٬۹۵۲٬۰۰۰ ریال = ۵۹۵٬۲۰۰ تومان — همان مبلغی که سرور روی مراجعه میگذارد.
|
|
nextStep();
|
|
await waitFor(() => expect(amountInputs()[0]).toHaveValue('۵۹۵٬۲۰۰'));
|
|
});
|
|
|
|
it('هزینهٔ ویزیتِ خودِ نوبت بر «قیمت ویزیت آزاد» اولویت دارد', async () => {
|
|
mockInsurance(BOTH, 9_000_000);
|
|
renderReference(); // نوبت خودش ۵٬۹۵۲٬۰۰۰ دارد
|
|
|
|
await screen.findByText('مبلغ قابل پرداخت');
|
|
nextStep();
|
|
await waitFor(() => expect(amountInputs()[0]).toHaveValue('۵۹۵٬۲۰۰'));
|
|
});
|
|
|
|
it('نوع بستری درصد خودش را میگیرد (۳۰٪)', async () => {
|
|
mockInsurance(BOTH);
|
|
renderReference();
|
|
|
|
await screen.findByText('نوع خدمت');
|
|
await pick('انتخاب نوع خدمت', 'خدمات بستری');
|
|
await pick('بدون بیمه', 'بیمه ایران');
|
|
|
|
// ۵٬۹۵۲٬۰۰۰ × ۳۰٪ = ۱٬۷۸۵٬۶۰۰ سهم بیمه · ۴٬۱۶۶٬۴۰۰ سهم بیمار
|
|
await screen.findByText('سهم بیمار (قابل پرداخت)');
|
|
nextStep();
|
|
await waitFor(() => expect(amountInputs()[0]).toHaveValue('۴۱۶٬۶۴۰'));
|
|
});
|
|
});
|
|
|
|
describe('ConfirmAppointmentModal — ویزارد', () => {
|
|
const stepLabels = () =>
|
|
Array.from(document.querySelectorAll('ol[aria-label="مراحل قطعی کردن نوبت"] li'))
|
|
.map(li => li.textContent?.replace(/^\d+/, '').trim());
|
|
|
|
it('سه مرحله دارد و از «بیمه و هزینه» شروع میشود', () => {
|
|
render();
|
|
|
|
expect(stepLabels()).toEqual(['بیمه و هزینه', 'پرداخت', 'تأیید']);
|
|
// جدول هزینه در مرحلهٔ اول است، ردیف پرداخت هنوز نه.
|
|
expect(screen.getByText('جمع کل')).toBeInTheDocument();
|
|
expect(screen.queryByPlaceholderText('0')).toBeNull();
|
|
});
|
|
|
|
it('در مرحلهٔ اول دکمهٔ قطعی وجود ندارد و «مرحلهٔ قبل» هم نیست', () => {
|
|
render();
|
|
|
|
expect(screen.queryByRole('button', { name: 'تأیید و قطعی کردن' })).not.toBeInTheDocument();
|
|
expect(screen.queryByRole('button', { name: 'مرحلهٔ قبل' })).not.toBeInTheDocument();
|
|
expect(screen.getByRole('button', { name: 'انصراف' })).toBeInTheDocument();
|
|
});
|
|
|
|
it('مرحلهٔ قبل مقادیر واردشده را نگه میدارد', () => {
|
|
render();
|
|
|
|
fireEvent.change(goToPayment()[0], { target: { value: '100000' } });
|
|
fireEvent.click(screen.getByRole('button', { name: 'مرحلهٔ قبل' }));
|
|
expect(screen.getByText('جمع کل')).toBeInTheDocument();
|
|
|
|
// برگشت به پرداخت: مبلغ همان است، نه پیشفرضِ کل.
|
|
nextStep();
|
|
expect(amountInputs()[0]).toHaveValue('۱۰۰٬۰۰۰');
|
|
});
|
|
|
|
it('مرحلهٔ آخر روشهای پرداخت را قبل از ثبت خلاصه میکند', () => {
|
|
render();
|
|
|
|
fireEvent.change(goToPayment()[0], { target: { value: '100000' } });
|
|
goToReview();
|
|
|
|
expect(screen.getByText('پرداخت نقدی')).toBeInTheDocument();
|
|
expect(screen.getByRole('button', { name: 'تأیید و قطعی کردن' })).toBeInTheDocument();
|
|
});
|
|
});
|
|
|
|
/** جمع نوبتِ تست: ۲۱۲۰۰۰۰ + ۸۸۰۰۰۰ ریال = ۳۰۰٬۰۰۰ تومان. */
|
|
describe('ConfirmAppointmentModal — میانبُرهای درصدی', () => {
|
|
const percentButton = (percent: string) =>
|
|
screen.getAllByRole('button', { name: `${percent}٪` })[0];
|
|
|
|
it('کلیک روی هر درصد، همان کسر از سهم بیمار را در مبلغ میگذارد', () => {
|
|
render();
|
|
const [amount] = goToPayment();
|
|
|
|
fireEvent.click(percentButton('۲۰'));
|
|
expect(amount).toHaveValue('۶۰٬۰۰۰');
|
|
|
|
fireEvent.click(percentButton('۵۰'));
|
|
expect(amount).toHaveValue('۱۵۰٬۰۰۰');
|
|
|
|
fireEvent.click(percentButton('۷۰'));
|
|
expect(amount).toHaveValue('۲۱۰٬۰۰۰');
|
|
|
|
fireEvent.click(percentButton('۱۰۰'));
|
|
expect(amount).toHaveValue('۳۰۰٬۰۰۰');
|
|
});
|
|
|
|
it('درصدِ اعمالشده تا مرحلهٔ ثبت میماند و به سرور میرسد', async () => {
|
|
render();
|
|
goToPayment();
|
|
|
|
fireEvent.click(percentButton('۵۰'));
|
|
goToReview();
|
|
fireEvent.click(screen.getByRole('button', { name: 'تأیید و قطعی کردن' }));
|
|
|
|
await waitFor(() => expect(post).toHaveBeenCalled());
|
|
expect(post.mock.calls[0][1].payments).toEqual([
|
|
{ method: 'cash', amount_rials: 1_500_000 },
|
|
]);
|
|
});
|
|
|
|
it('هر ردیف درصد خودش را دارد؛ ردیف دیگر دست نمیخورد', () => {
|
|
render();
|
|
goToPayment();
|
|
|
|
fireEvent.click(screen.getByRole('button', { name: /افزودن روش/ }));
|
|
const rows = amountInputs();
|
|
expect(rows).toHaveLength(2);
|
|
|
|
// ۲۰٪ روی ردیف دوم، بدون اثر روی ردیف اول که پیشفرضِ کامل دارد.
|
|
const secondRowPercent = screen.getAllByRole('button', { name: '۲۰٪' })[1];
|
|
fireEvent.click(secondRowPercent);
|
|
|
|
expect(rows[0]).toHaveValue('۳۰۰٬۰۰۰');
|
|
expect(rows[1]).toHaveValue('۶۰٬۰۰۰');
|
|
});
|
|
|
|
it('نوبتِ بدون هزینه اصلاً دکمهٔ درصدی ندارد', () => {
|
|
renderWithProviders(
|
|
<ConfirmAppointmentModal
|
|
open
|
|
appointmentUuid="a2"
|
|
appointment={{ uuid: 'a2', version: 1, visit_price_rials: 0, service_items: [] }}
|
|
onClose={() => {}}
|
|
/>,
|
|
);
|
|
nextStep();
|
|
|
|
expect(screen.queryByRole('button', { name: '۵۰٪' })).not.toBeInTheDocument();
|
|
});
|
|
});
|