test(desktop): exit Electron after screenshot verification

CI completed every screenshot assertion but remained alive after app.quit. Exit the standalone test explicitly and keep its deadline active until process shutdown.
This commit is contained in:
Mohamed Boudra
2026-09-10 10:01:00 +02:00
parent b601a99a32
commit 5073500d39
@@ -145,17 +145,16 @@ async function verifyBrowserLifecycle() {
}
}
const deadline = setTimeout(() => {
setTimeout(() => {
console.error("Browser throttling regression timed out");
app.exit(1);
}, 30000);
app
.whenReady()
.then(verifyBrowserLifecycle)
.then(() => app.quit())
.then(() => app.exit(0))
.catch((error) => {
console.error(error);
app.exit(1);
})
.finally(() => clearTimeout(deadline));
app.on("will-quit", () => fs.rmSync(profile, { recursive: true, force: true }));
});
app.on("quit", () => fs.rmSync(profile, { recursive: true, force: true }));