mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix integration tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
277a028506
commit
5dbcefa3d1
@ -328,6 +328,8 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
|||||||
}, 10*60*1000);
|
}, 10*60*1000);
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
|
await frame.click(`[data-testid="sidebar-cluster-dropdown"]`);
|
||||||
|
await frame.click(`.Menu >> text="Disconnect"`);
|
||||||
await cleanup();
|
await cleanup();
|
||||||
}, 10*60*1000);
|
}, 10*60*1000);
|
||||||
|
|
||||||
@ -337,6 +339,7 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
|||||||
await frame.waitForSelector(`.Menu >> text="Settings"`);
|
await frame.waitForSelector(`.Menu >> text="Settings"`);
|
||||||
await frame.waitForSelector(`.Menu >> text="Disconnect"`);
|
await frame.waitForSelector(`.Menu >> text="Disconnect"`);
|
||||||
await frame.waitForSelector(`.Menu >> text="Delete"`);
|
await frame.waitForSelector(`.Menu >> text="Delete"`);
|
||||||
|
await frame.click(`[data-testid="sidebar-cluster-dropdown"]`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should navigate around common cluster pages", async () => {
|
it("should navigate around common cluster pages", async () => {
|
||||||
@ -370,7 +373,7 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
|||||||
}
|
}
|
||||||
}, 10*60*1000);
|
}, 10*60*1000);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
it("show logs and highlight the log search entries", async () => {
|
it("show logs and highlight the log search entries", async () => {
|
||||||
await frame.click(`a[href="/workloads"]`);
|
await frame.click(`a[href="/workloads"]`);
|
||||||
|
|||||||
@ -72,7 +72,12 @@ export async function start() {
|
|||||||
...process.env,
|
...process.env,
|
||||||
},
|
},
|
||||||
timeout: 100_000,
|
timeout: 100_000,
|
||||||
} as Parameters<typeof electron["launch"]>[0]);
|
});
|
||||||
|
|
||||||
|
const cleanup = async () => {
|
||||||
|
await app.close();
|
||||||
|
await remove(CICD).catch(noop);
|
||||||
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const window = await getMainWindow(app);
|
const window = await getMainWindow(app);
|
||||||
@ -80,14 +85,10 @@ export async function start() {
|
|||||||
return {
|
return {
|
||||||
app,
|
app,
|
||||||
window,
|
window,
|
||||||
cleanup: async () => {
|
cleanup,
|
||||||
await app.close();
|
|
||||||
await remove(CICD).catch(noop);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await app.close();
|
await cleanup();
|
||||||
await remove(CICD).catch(noop);
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user