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

test(ui): statically gate native dialog Cancel/Confirm and keyboard focus-wrap regression evidence

davoodmehraban89 committed Oct 30, 2026 at 23:44 UTC 3e05b027bee313a3871bef5a1624d6c21aa78d51
1 file changed +17
tests/ui-control-structure.test.mjs
+17
@@ -109,3 +109,20 @@ test('Q01: pressing plain Enter on focused Cancel, buttons or inputs must not in
109 assert.match(nativeAudit, /enterOnInputDoesNotSubmit:true/);
110 assert.match(nativeAudit, /'Enter on focused Cancel was hijacked as financial confirmation'/);
111 });
112 +
113 +test('Q01: installed WebView2 must click synthetic modal Cancel/Confirm and trap Tab both directions', () => {
114 + const audit=fs.readFileSync(path.join(root,'tests','windows-vm-ui-interaction-audit-browser.js'),'utf8');
115 + const native=fs.readFileSync(path.join(root,'tests','windows-vm-installed-tauri-cdp.cjs'),'utf8');
116 + for (const check of [
117 + 'tabAndShiftTabStayInsideTopDialog:true',
118 + 'cancelDoesNotConfirmAndRestoresFocus:true',
119 + 'syntheticConfirmRunsExactlyOnce:true',
120 + 'syntheticConfirmed!==0','syntheticConfirmed!==1',
121 + 'tabForward.defaultPrevented','tabBackward.defaultPrevented'
122 + ]) assert.ok(audit.includes(check),'native modal control evidence missing: '+check);
123 + for(const check of [
124 + 'modalKeyboard.tabAndShiftTabStayInsideTopDialog',
125 + 'modalKeyboard.cancelDoesNotConfirmAndRestoresFocus',
126 + 'modalKeyboard.syntheticConfirmRunsExactlyOnce'
127 + ]) assert.ok(native.includes(check),'installed native runner must assert: '+check);
128 +});