This commit is contained in:
2026-10-18 14:15:43 +07:00
parent 0cd736f682
commit 913b237cb8
14 changed files with 1042 additions and 100 deletions
+8 -2
View File
@@ -200,7 +200,13 @@ async function poll(check, label) {
app.whenReady().then(async () => {
try {
await seeded
const control = await poll(() => BrowserWindow.getAllWindows()[0], 'control')
const control = await poll(
() =>
BrowserWindow.getAllWindows().find(
(w) => w.webContents.getURL() === 'screen-app://app/index.html',
),
'control',
)
if (process.platform === 'linux')
assert.ok(control.getNativeWindowHandle().readUInt32LE(0) > 0xffff, 'native X11 window ID')
control.webContents.on('console-message', (_event, details) =>
@@ -210,7 +216,7 @@ app.whenReady().then(async () => {
await poll(
async () =>
!control.webContents.isLoading() &&
(await evaluate('!!window.screenBridge && !!document.querySelector("h1")')),
(await evaluate('!!window.screenBridge && !!document.querySelector("main.control")')),
'control UI',
)
if (manual) {