ci(windows-smoke): tray, badge, taskbar, thumbbar and media-control commands (#4, #7) #44

Merged
jared merged 2 commits from ci/smoke-native-commands into main 2026-10-22 22:01:16 -04:00
Showing only changes of commit fbb24dfce7 - Show all commits
+11 -2
View File
@@ -360,10 +360,19 @@ for (const [cmd, args] of calls) {
if (err) failures.push(`${cmd}(${JSON.stringify(args)}): ${err}`); if (err) failures.push(`${cmd}(${JSON.stringify(args)}): ${err}`);
} }
const alive = await page.evaluate(() => document.title !== undefined).catch(() => false); const alive = await page.evaluate(() => document.title !== undefined).catch(() => false);
// Without a desktop there is no Explorer shell: the tray icon, the taskbar
// overlay badge and the thumbnail toolbar can't exist, and Windows answers
// E_FAIL / E_NOTIMPL. cinny ignores those errors; the app must just survive.
const SHELL_ONLY = /^(set_badge_count|set_tray_unread|set_tray_call_state|set_tray_update_ready|set_thumbbar)\(/;
const real = interactive ? failures : failures.filter((f) => !SHELL_ONLY.test(f));
record( record(
'tray, badge, taskbar, thumbbar and media-control commands', 'tray, badge, taskbar, thumbbar and media-control commands',
failures.length === 0 && alive ? 'pass' : 'fail', real.length === 0 && alive ? 'pass' : 'fail',
failures.length ? failures.join(' | ') : `${calls.length} calls ok, app still responsive: ${alive}`, real.length
? real.join(' | ')
: `${calls.length - failures.length}/${calls.length} calls ok${
failures.length ? `, ${failures.length} shell-only calls n/a without a desktop` : ''
}; app still responsive: ${alive}`,
); );
await page.screenshot({ path: `${OUT}/02-end.png` }).catch(() => undefined); await page.screenshot({ path: `${OUT}/02-end.png` }).catch(() => undefined);