فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): assert unique safeConfirmAction matcher and no lexical collision
davoodmehraban89 committed
Oct 31, 2026 at 09:42 UTC
9ff5ac03c715edcfca5ca11d29da702986e4874d
1 file changed
+4
-2
tests/ui-control-structure.test.mjs
+4
-2
@@ -334,8 +334,10 @@ test('Q01: financial mutations are not mislabeled safe by the static control cat
334
335
test('Q01: native UI audit has no duplicate safeConfirm lexical declaration', () => {
336
const audit=fs.readFileSync(path.join(root,'tests','windows-vm-ui-interaction-audit-browser.js'),'utf8');
337
- const declarations=audit.match(/\\bconst\\s+safeConfirm\\s*=/g)||[];
338
- assert.equal(declarations.length,1,'safeConfirm action matcher must be declared exactly once');
337
+ const declarations=audit.match(/\\bconst\\s+safeConfirmAction\\s*=/g)||[];
338
+ assert.equal(declarations.length,1,'safeConfirmAction matcher must be declared exactly once');
339
+ assert.doesNotMatch(audit,/\\bconst\\s+safeConfirm\\s*=/,
340
+ 'the matcher must not collide with modal fixture variable names');
341
assert.match(audit,/const safeConfirmDialog=FINORA\\.Modal\\.stack/);
342
assert.match(audit,/safeConfirmDialog\\.querySelector/);
343
});