Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
fix(gui): wait for hydrated SQL editor before CDP assertions
davoodmehraban89 committed
Oct 16, 2026 at 22:49 UTC
6179f0a9819774503afe040997b9c8118dc0da21
1 file changed
+2
-1
qa/windows/electron-native-gui-smoke.mjs
+2
-1
@@ -1,4 +1,5 @@
1
import assert from 'node:assert/strict';
2
+import {isIntegrationsEditorReady} from './gui-readiness.mjs';
3
import {spawn,execFileSync} from 'node:child_process';
4
import {writeFileSync,mkdirSync,existsSync} from 'node:fs';
5
import {join,basename} from 'node:path';
@@ -43,7 +44,7 @@ try{
44
await conn.command('Page.navigate',{url:'http://127.0.0.1:3210/integrations'});
45
const page=await wait(async()=>{const x=await conn.evaluate(
46
"({href:location.href,title:document.title,editor:!!document.querySelector('textarea'),copy:[...document.querySelectorAll('button')].some(b=>b.textContent.includes('کپی کوئری'))})");
46
- return x?.href?.endsWith('/integrations')?x:null;});
47
+ return isIntegrationsEditorReady(x)?x:null;});
48
report.integrations=true;report.queryEditor=page.editor;report.copyQuery=page.copy;
49
assert(report.queryEditor,'QUERY_EDITOR_MISSING_IN_NATIVE_APP');
50
assert(report.copyQuery,'COPY_BUTTON_MISSING_IN_NATIVE_APP');