فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(A01): await lazy invoice-linked native receipt and payment modal
davoodmehraban89 committed
Oct 17, 2026 at 00:48 UTC
1b9fefcdae31b01a68f0f3593bc7bc1983399608
1 file changed
+2
-2
tests/windows-vm-native-functional-matrix.cjs
+2
-2
@@ -614,7 +614,7 @@ async function nativeReturnCashSettlementGuardrails() {
614
const before=()=>Promise.all(['journal_entries','treasury','settlements'].map(async name=>
615
(await db.getAll(name)).length));
616
const testReceipt=async(amount)=>{
617
- view.openReceiptModal();
617
+ await view.openReceiptModal();
618
const sel=document.getElementById('txInvoiceRef');
619
check(sel&&[...sel.options].some(x=>x.value===sale.id),
620
'Real treasury UI does not list the unpaid original sale');
@@ -634,7 +634,7 @@ async function nativeReturnCashSettlementGuardrails() {
634
await testReceipt(200);
635
check((await db.get('invoices',sale.id)).paidAmount===400,
636
'Allowed residual collection did not reach net post-return amount');
637
- view.openPaymentModal();
637
+ await view.openPaymentModal();
638
const sel=document.getElementById('txInvoiceRef');
639
check(sel&&[...sel.options].some(x=>x.value===returned.id),
640
'Real treasury UI cannot select the customer return');