فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): rename safe confirmation matcher to avoid WebView2 lexical collision
davoodmehraban89 committed
Oct 31, 2026 at 08:26 UTC
0b780c0ddbda1b4d69aa289671e7fd8c81ae8686
1 file changed
+4
-4
tests/windows-vm-ui-interaction-audit-browser.js
+4
-4
@@ -40,7 +40,7 @@
40
const safeOpen = /\.(?:openNewInvoice|openProductModal|openUnitModal|openCategoryModal|openContactModal|openExpenseModal|openChequeModal|openAccountModal|openReceiptModal|openPaymentModal|openTransferModal|openCompanyModal|openCompanySwitcher|openExportSectionModal|openSignedLicenseModal|openAuditTrail|openWipeModal|openRestoreModal|openPeriodModal|openJournalModal|openWarehouse|openStocktakeCreate|openTransfer|openReversal|_openQuickProduct|_openQuickContact|openLedger|openKardex|openStocktake|showJournal|editInvoice|editProduct|editContact|editCheque|editAccount|changeStatus|openAdjustModal|_printInvoice|printInvoice|checkHolooMigrationReadiness|runFinancialDiagnostics)\s*\(/;
41
// A delete/close-period/seed action is safe to probe only up to its
42
// confirmation prompt. The audit must cancel and prove zero database writes.
43
- const safeConfirm = /\.(?:deleteInvoice|deleteProduct|deleteContact|deleteCheque|deleteTransaction|deleteExpense|deleteAccount|closePeriod|seedChart)\s*\(/;
43
+ const safeConfirmAction = /\.(?:deleteInvoice|deleteProduct|deleteContact|deleteCheque|deleteTransaction|deleteExpense|deleteAccount|closePeriod|seedChart)\s*\(/;
44
const clickables = (root) => [...root.querySelectorAll(
45
'button, a, [role="button"], input[type="button"], input[type="submit"], [onclick]'
46
)].filter(isVisible);
@@ -603,11 +603,11 @@
603
row.status='broken-handler';row.reason='target function missing';
604
failures.push({route,section:ctx.section,kind:'missing-function',callee:parsed.callee});
605
} else if (el.disabled) {row.status='disabled';row.reason='disabled state';}
606
- else if (!safeConfirm.test(code) && !safeNavigate.test(code) && !safeFilter.test(code) && !safeOpen.test(code) && dangerous.test(code)) {
606
+ else if (!safeConfirmAction.test(code) && !safeNavigate.test(code) && !safeFilter.test(code) && !safeOpen.test(code) && dangerous.test(code)) {
607
row.status='not-clicked';row.reason='financial or destructive action needs explicit fixture-backed test';
608
} else if (!code) {
609
row.status='not-clicked';row.reason='dynamic event listener or no inline action; requires focused audit';
610
- } else if (!safeTab.test(code) && !safeNavigate.test(code) && !safeFilter.test(code) && !safeOpen.test(code) && !safeConfirm.test(code)) {
610
+ } else if (!safeTab.test(code) && !safeNavigate.test(code) && !safeFilter.test(code) && !safeOpen.test(code) && !safeConfirmAction.test(code)) {
611
row.status='not-clicked';row.reason='not on audited safe-action allowlist';
612
}
613
}
@@ -637,7 +637,7 @@
637
const confirmSnapshot=async()=>JSON.stringify(await Promise.all(confirmStores.map(async store=>
638
[store,await FINORA.Storage.getAll(store)])));
639
const confirmActions=[...new Set(controls
640
- .filter(el=>!el.disabled && safeConfirm.test(handler(el)))
640
+ .filter(el=>!el.disabled && safeConfirmAction.test(handler(el)))
641
.map(el=>handler(el)))].slice(0,30);
642
for(const action of confirmActions){
643
window.__Q01_AUDIT_STAGE='confirm-cancel:'+route+':'+action;