From 3c9dc8e5ce0d1436b9942cc696ecb4131dcbb520 Mon Sep 17 00:00:00 2001 From: binaricat <16399091+binaricat@users.noreply.github.com> Date: Sat, 21 Nov 2026 12:27:27 +0000 Subject: [PATCH] fix(qa): align runtime window lookup with native input lookup --- scripts/qa-official-linux/desktop.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qa-official-linux/desktop.cjs b/scripts/qa-official-linux/desktop.cjs index 5ad88e466..a0b39041f 100644 --- a/scripts/qa-official-linux/desktop.cjs +++ b/scripts/qa-official-linux/desktop.cjs @@ -203,7 +203,7 @@ async function launch() { const inspector = await until('official Electron main inspector', async () => (await (await fetch(`http://127.0.0.1:${inspectPort}/json/list`)).json())[0]); mainCdp = new Devtools(inspector.webSocketDebuggerUrl); await mainCdp.connect(); - const runtime = await mainCdp.eval(`(() => { const { app, BrowserWindow } = process.mainModule.require('electron'); const win = BrowserWindow.getAllWindows().find(w => /index\\.html/.test(w.webContents.getURL())); win.focus(); return { packaged: app.isPackaged, appPath: app.getAppPath(), profile: app.getPath('userData'), argv: process.argv, uid: process.getuid(), electron: process.versions.electron, rendererPreferences: { sandbox: win.webContents.getLastWebPreferences().sandbox, contextIsolation: win.webContents.getLastWebPreferences().contextIsolation, nodeIntegration: win.webContents.getLastWebPreferences().nodeIntegration } }; })()`); + const runtime = await mainCdp.eval(`(() => { const { app, BrowserWindow } = process.mainModule.require('electron'); const win = BrowserWindow.getAllWindows().find(w => w.webContents.getURL().startsWith('app://netcatty/index.html')); win.focus(); return { packaged: app.isPackaged, appPath: app.getAppPath(), profile: app.getPath('userData'), argv: process.argv, uid: process.getuid(), electron: process.versions.electron, rendererPreferences: { sandbox: win.webContents.getLastWebPreferences().sandbox, contextIsolation: win.webContents.getLastWebPreferences().contextIsolation, nodeIntegration: win.webContents.getLastWebPreferences().nodeIntegration } }; })()`); assert.equal(runtime.packaged, true); assert(runtime.appPath.endsWith('/resources/app.asar')); assert.equal(runtime.profile, profile);