mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
And handling for tests failing to start
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
54c3a38254
commit
0b8868a14e
@ -13,7 +13,8 @@ import type { ElectronApplication, Page } from "playwright";
|
|||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
|
|
||||||
describe("preferences page tests", () => {
|
describe("preferences page tests", () => {
|
||||||
let window: Page, cleanup: () => Promise<void>;
|
let window: Page;
|
||||||
|
let cleanup: undefined | (() => Promise<void>);
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
let app: ElectronApplication;
|
let app: ElectronApplication;
|
||||||
@ -31,7 +32,7 @@ describe("preferences page tests", () => {
|
|||||||
}, 10*60*1000);
|
}, 10*60*1000);
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
await cleanup();
|
await cleanup?.();
|
||||||
}, 10*60*1000);
|
}, 10*60*1000);
|
||||||
|
|
||||||
it('shows "preferences" and can navigate through the tabs', async () => {
|
it('shows "preferences" and can navigate through the tabs', async () => {
|
||||||
|
|||||||
@ -19,7 +19,9 @@ import { describeIf } from "../../src/test-utils/skippers";
|
|||||||
const TEST_NAMESPACE = "integration-tests";
|
const TEST_NAMESPACE = "integration-tests";
|
||||||
|
|
||||||
describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
||||||
let window: Page, cleanup: () => Promise<void>, frame: Frame;
|
let window: Page;
|
||||||
|
let cleanup: undefined | (() => Promise<void>);
|
||||||
|
let frame: Frame;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
({ window, cleanup } = await utils.start());
|
({ window, cleanup } = await utils.start());
|
||||||
@ -29,7 +31,7 @@ describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
|||||||
}, 10 * 60 * 1000);
|
}, 10 * 60 * 1000);
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
await cleanup();
|
await cleanup?.();
|
||||||
}, 10 * 60 * 1000);
|
}, 10 * 60 * 1000);
|
||||||
|
|
||||||
it("shows cluster context menu in sidebar", async () => {
|
it("shows cluster context menu in sidebar", async () => {
|
||||||
|
|||||||
@ -7,15 +7,17 @@ import type { ElectronApplication, Page } from "playwright";
|
|||||||
import * as utils from "../helpers/utils";
|
import * as utils from "../helpers/utils";
|
||||||
|
|
||||||
describe("Lens command palette", () => {
|
describe("Lens command palette", () => {
|
||||||
let window: Page, cleanup: () => Promise<void>, app: ElectronApplication;
|
let window: Page;
|
||||||
|
let cleanup: undefined | (() => Promise<void>);
|
||||||
|
let app: ElectronApplication;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
({ window, cleanup, app } = await utils.start());
|
({ window, cleanup, app } = await utils.start());
|
||||||
await utils.clickWelcomeButton(window);
|
await utils.clickWelcomeButton(window);
|
||||||
}, 10*60*1000);
|
}, 10*60*1000);
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
await cleanup();
|
await cleanup?.();
|
||||||
}, 10*60*1000);
|
}, 10*60*1000);
|
||||||
|
|
||||||
describe("menu", () => {
|
describe("menu", () => {
|
||||||
|
|||||||
@ -28,6 +28,7 @@ async function getMainWindow(app: ElectronApplication, timeout = 50_000): Promis
|
|||||||
|
|
||||||
if (page.url().startsWith("http://localhost")) {
|
if (page.url().startsWith("http://localhost")) {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
console.log(stdoutBuf);
|
||||||
resolve(page);
|
resolve(page);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user