فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(a01): add one-shot and stale financial confirmation contracts

davoodmehraban89 committed Oct 31, 2026 at 00:37 UTC b8677da3ef4352278efd0d00af457ea9a3723463
1 file changed +13
tests/ui-control-structure.test.mjs
+13
@@ -111,6 +111,19 @@ test('Q01: shared dialogs have ARIA naming, keyboard dismissal and focus restora
111 assert.match(code, /removeEventListener\('keydown'/);
112 });
113
114 +test('A01: confirmation buttons are one-shot and reject stale/hidden financial actions', () => {
115 + const modal=fs.readFileSync(path.join(root,'src','core','Modal.js'),'utf8');
116 + const native=fs.readFileSync(path.join(root,'tests','windows-vm-ui-interaction-audit-browser.js'),'utf8');
117 + const windowsRunner=fs.readFileSync(path.join(root,'tests','windows-vm-installed-tauri-cdp.cjs'),'utf8');
118 + assert.ok(modal.includes('let settled = false'));
119 + assert.ok(modal.includes('this.stack[this.stack.length - 1] === modal'));
120 + assert.equal(modal.split('if (settled || !isActive()) return;').length - 1, 2);
121 + assert.ok(native.includes('staleConfirm?.click()'));
122 + assert.ok(native.includes('hiddenParent?.querySelector'));
123 + assert.ok(native.includes('staleFinancialConfirmIgnored:true'));
124 + assert.ok(windowsRunner.includes('modalKeyboard.staleFinancialConfirmIgnored'));
125 +});
126 +
127 test('Q01: form labels are only associated within unambiguous modal groups', () => {
128 const modal=fs.readFileSync(path.join(root,'src','core','Modal.js'),'utf8');
129 const audit=fs.readFileSync(path.join(root,'tests','windows-vm-ui-interaction-audit-browser.js'),'utf8');