mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 08:24:46 +00:00
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:
@@ -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 }));
|
||||
|
||||
Reference in New Issue
Block a user