mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix integration tests
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
52b447948d
commit
e915a8e184
@ -13,7 +13,6 @@ export function setup(): Application {
|
|||||||
path: AppPaths[process.platform],
|
path: AppPaths[process.platform],
|
||||||
startTimeout: 30000,
|
startTimeout: 30000,
|
||||||
waitTimeout: 60000,
|
waitTimeout: 60000,
|
||||||
chromeDriverArgs: ['remote-debugging-port=9222'],
|
|
||||||
env: {
|
env: {
|
||||||
CICD: "true"
|
CICD: "true"
|
||||||
}
|
}
|
||||||
@ -22,10 +21,12 @@ export function setup(): Application {
|
|||||||
|
|
||||||
export async function tearDown(app: Application) {
|
export async function tearDown(app: Application) {
|
||||||
const pid = app.mainProcess.pid
|
const pid = app.mainProcess.pid
|
||||||
|
let ppid: any = pid
|
||||||
|
ppid = await ppid()
|
||||||
await app.stop()
|
await app.stop()
|
||||||
try {
|
try {
|
||||||
process.kill(pid, 0);
|
process.kill(ppid, "SIGKILL");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,12 +87,11 @@ app.on("activate", (event, hasVisibleWindows) => {
|
|||||||
app.on("will-quit", (event) => {
|
app.on("will-quit", (event) => {
|
||||||
logger.info('APP:QUIT');
|
logger.info('APP:QUIT');
|
||||||
event.preventDefault(); // prevent app's default shutdown (e.g. required for telemetry, etc.)
|
event.preventDefault(); // prevent app's default shutdown (e.g. required for telemetry, etc.)
|
||||||
|
clusterManager?.stop();
|
||||||
if (userStore.preferences.trayEnabled) {
|
if (userStore.preferences.trayEnabled) {
|
||||||
return; // with tray the app remains open
|
return; // with tray the app remains open
|
||||||
} else {
|
} else {
|
||||||
windowManager?.destroy();
|
windowManager?.destroy();
|
||||||
clusterManager?.stop();
|
|
||||||
proxyServer?.close();
|
proxyServer?.close();
|
||||||
app.exit(); // forced app.quit()
|
app.exit(); // forced app.quit()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,7 @@ export class WindowManager {
|
|||||||
if (showSplash) await this.showSplash();
|
if (showSplash) await this.showSplash();
|
||||||
await this.mainWindow.loadURL(this.mainUrl);
|
await this.mainWindow.loadURL(this.mainUrl);
|
||||||
this.mainWindow.show();
|
this.mainWindow.show();
|
||||||
this.splashWindow?.hide();
|
this.splashWindow?.close();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
dialog.showErrorBox("ERROR!", err.toString())
|
dialog.showErrorBox("ERROR!", err.toString())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user