mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove redundant kludge for waiting till next tick for not being needed anymore in jest 28
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
8f248a7f23
commit
8c334c90cf
@ -37,8 +37,8 @@ describe("extensions - navigation using application menu", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("when navigating to extensions using application menu", () => {
|
describe("when navigating to extensions using application menu", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(() => {
|
||||||
await applicationBuilder.applicationMenu.click("root.extensions");
|
applicationBuilder.applicationMenu.click("root.extensions");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("focuses the window", () => {
|
it("focuses the window", () => {
|
||||||
|
|||||||
@ -28,8 +28,8 @@ describe("preferences - navigation using application menu", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("when navigating to preferences using application menu", () => {
|
describe("when navigating to preferences using application menu", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(() => {
|
||||||
await applicationBuilder.applicationMenu.click("root.preferences");
|
applicationBuilder.applicationMenu.click("root.preferences");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders", () => {
|
it("renders", () => {
|
||||||
|
|||||||
@ -49,8 +49,8 @@ describe("quitting the app using application menu", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("when application is quit", () => {
|
describe("when application is quit", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(() => {
|
||||||
await applicationBuilder.applicationMenu.click("root.quit");
|
applicationBuilder.applicationMenu.click("root.quit");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("closes all windows", () => {
|
it("closes all windows", () => {
|
||||||
|
|||||||
@ -28,8 +28,8 @@ describe("welcome - navigation using application menu", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("when navigating to welcome using application menu", () => {
|
describe("when navigating to welcome using application menu", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(() => {
|
||||||
await applicationBuilder.applicationMenu.click("help.welcome");
|
applicationBuilder.applicationMenu.click("help.welcome");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders", () => {
|
it("renders", () => {
|
||||||
|
|||||||
@ -39,7 +39,6 @@ import { KubeObjectStore } from "../../../common/k8s-api/kube-object.store";
|
|||||||
import clusterFrameContextInjectable from "../../cluster-frame-context/cluster-frame-context.injectable";
|
import clusterFrameContextInjectable from "../../cluster-frame-context/cluster-frame-context.injectable";
|
||||||
import startMainApplicationInjectable from "../../../main/start-main-application/start-main-application.injectable";
|
import startMainApplicationInjectable from "../../../main/start-main-application/start-main-application.injectable";
|
||||||
import startFrameInjectable from "../../start-frame/start-frame.injectable";
|
import startFrameInjectable from "../../start-frame/start-frame.injectable";
|
||||||
import { flushPromises } from "../../../common/test-utils/flush-promises";
|
|
||||||
import type { NamespaceStore } from "../+namespaces/store";
|
import type { NamespaceStore } from "../+namespaces/store";
|
||||||
import namespaceStoreInjectable from "../+namespaces/store.injectable";
|
import namespaceStoreInjectable from "../+namespaces/store.injectable";
|
||||||
import historyInjectable from "../../navigation/history.injectable";
|
import historyInjectable from "../../navigation/history.injectable";
|
||||||
@ -76,7 +75,7 @@ export interface ApplicationBuilder {
|
|||||||
};
|
};
|
||||||
|
|
||||||
applicationMenu: {
|
applicationMenu: {
|
||||||
click: (path: string) => Promise<void>;
|
click: (path: string) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
preferences: {
|
preferences: {
|
||||||
@ -207,7 +206,7 @@ export const getApplicationBuilder = () => {
|
|||||||
dis,
|
dis,
|
||||||
|
|
||||||
applicationMenu: {
|
applicationMenu: {
|
||||||
click: async (path: string) => {
|
click: (path: string) => {
|
||||||
const applicationMenuItems = mainDi.inject(
|
const applicationMenuItems = mainDi.inject(
|
||||||
applicationMenuItemsInjectable,
|
applicationMenuItemsInjectable,
|
||||||
);
|
);
|
||||||
@ -238,8 +237,6 @@ export const getApplicationBuilder = () => {
|
|||||||
undefined,
|
undefined,
|
||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
|
|
||||||
await flushPromises();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user