فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): lock safe nested modal and invoice draft audit coverage
davoodmehraban89 committed
Oct 31, 2026 at 11:36 UTC
bbccfc655718ba5666d5ef9bfc305f559c0ac449
1 file changed
+11
tests/ui-control-structure.test.mjs
+11
@@ -165,6 +165,17 @@ test('Q01: deferred safe actions survive live label changes and slow tab renderi
165
assert.doesNotMatch(audit,/handler\(x\)===action\.handler && name\(x\)===action\.label/);
166
});
167
168
+test('Q01: native UI audit opens and cancels safe nested editors and restores invoice draft rows', () => {
169
+ const audit=fs.readFileSync(path.join(root,'tests','windows-vm-ui-interaction-audit-browser.js'),'utf8');
170
+ for(const token of ['_printInvoice','InvoicePrint\\._preview','nested-safe-action-did-not-open-dialog',
171
+ 'nested-modal-cancel-did-not-restore-parent','invoice-draft-add-row-failed',
172
+ 'invoice-draft-row-count-not-restored','invoice-last-row-removal-not-blocked',
173
+ 'unsaved-contact-tag-not-added','beforeModalDepth','afterModalDepth']) {
174
+ assert.ok(audit.includes(token),'native nested-modal audit missing: '+token);
175
+ }
176
+ assert.doesNotMatch(audit,/safeOpen\s*=.*_printReport|safeOpen\s*=.*_printKardex|safeOpen\s*=.*_printLedger/);
177
+});
178
+
179
test('Q01: native audit verifies safe routes, filters, edit previews and cancel-only destructive prompts', () => {
180
const audit=fs.readFileSync(path.join(root,'tests','windows-vm-ui-interaction-audit-browser.js'),'utf8');
181
for(const token of ['safeNavigate','safeFilter','safeOpen','safeConfirmAction',