سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 04:15 UTC
test(finance): require clean invoice prints while retaining draft/posting invariants
davoodmehraban89 committed
Oct 12, 2026 at 09:53 UTC
72a69b372ef59ffbb7dddebf81d64304b3559b04
1 file changed
+5
-1
scripts/posting-idempotency-check.mjs
+5
-1
@@ -22,5 +22,9 @@ assert.match(manager,/invoiceDocumentStatus\(inv\)/);
22
assert.match(product,/invoiceDocumentStatus\(x\)==='posted'/);
23
assert.match(inventory,/invoiceDocumentStatus\(d\)==='posted'/);
24
assert.match(cash,/invoiceDocumentStatus\(inv\)!=='posted'/);
25
-assert.match(print,/پیشنویس — غیرقطعی/);
25
+assert.doesNotMatch(print,/پیشنویس — غیرقطعی|draftMark/);
26
+assert.match(print,/stageInvoicePrint\(containerHtml,spec\)/);
27
+// Financial finalization remains explicit even though the ordinary paper print is clean.
28
+assert.match(invoice,/documentStatus:'draft',accountingStatus:'draft'/);
29
+assert.match(invoice,/async function finalizeInvoiceDocument\(/);
30
console.log('Financial draft/posted data safety invariants PASS');