up
This commit is contained in:
+8
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user