fix navigation-using-application-menu.test.ts

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-05-04 08:47:19 -04:00
1 parent 2684b4c130
commit 4fcfdae240
5 files changed
+13 -22

No files matched your search

@@ -272,16 +272,11 @@ exports[`preferences - navigation using application menu when navigating to pref
class="mt-4 mb-5 leading-relaxed" class="mt-4 mb-5 leading-relaxed"
> >
This setting is to change the registry URL for installing extensions by name. This setting is to change the registry URL for installing extensions by name.
If you are unable to access the default registry (https://registry.npmjs.org) you can change it in your
If you are unable to access the default registry (
https://registry.npmjs.org
)
you can change it in your
<b> <b>
.npmrc .npmrc
</b> </b>
 file or in the input below. file or in the input below.
</p> </p>
<div <div
class="Input theme round black disabled invalid" class="Input theme round black disabled invalid"
@@ -9,7 +9,6 @@ import userStoreInjectable from "../../common/user-store/user-store.injectable";
import type { UserStore } from "../../common/user-store"; import type { UserStore } from "../../common/user-store";
import { observable } from "mobx"; import { observable } from "mobx";
import defaultShellInjectable from "../../renderer/components/+preferences/default-shell.injectable"; import defaultShellInjectable from "../../renderer/components/+preferences/default-shell.injectable";
import themeStoreInjectable from "../../renderer/themes/store.injectable";
import ipcRendererInjectable from "../../renderer/app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable"; import ipcRendererInjectable from "../../renderer/app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable";
describe("preferences - navigation to terminal preferences", () => { describe("preferences - navigation to terminal preferences", () => {
@@ -27,7 +26,6 @@ describe("preferences - navigation to terminal preferences", () => {
rendererDi.override(userStoreInjectable, () => userStoreStub); rendererDi.override(userStoreInjectable, () => userStoreStub);
rendererDi.override(defaultShellInjectable, () => "some-default-shell"); rendererDi.override(defaultShellInjectable, () => "some-default-shell");
rendererDi.permitSideEffects(themeStoreInjectable);
rendererDi.override(ipcRendererInjectable, () => ({ rendererDi.override(ipcRendererInjectable, () => ({
on: jest.fn(), on: jest.fn(),
invoke: jest.fn(), // TODO: replace with proper mocking via the IPC bridge invoke: jest.fn(), // TODO: replace with proper mocking via the IPC bridge
@@ -9,8 +9,7 @@ import { getApplicationBuilder } from "../../renderer/components/test-utils/get-
import isAutoUpdateEnabledInjectable from "../../main/is-auto-update-enabled.injectable"; import isAutoUpdateEnabledInjectable from "../../main/is-auto-update-enabled.injectable";
import type { UserStore } from "../../common/user-store"; import type { UserStore } from "../../common/user-store";
import userStoreInjectable from "../../common/user-store/user-store.injectable"; import userStoreInjectable from "../../common/user-store/user-store.injectable";
import type { ThemeStore } from "../../renderer/themes/store"; import ipcRendererInjectable from "../../renderer/app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable";
import themeStoreInjectable from "../../renderer/themes/store.injectable";
describe("preferences - navigation using application menu", () => { describe("preferences - navigation using application menu", () => {
let applicationBuilder: ApplicationBuilder; let applicationBuilder: ApplicationBuilder;
@@ -27,10 +26,10 @@ describe("preferences - navigation using application menu", () => {
} as unknown as UserStore; } as unknown as UserStore;
rendererDi.override(userStoreInjectable, () => userStoreStub); rendererDi.override(userStoreInjectable, () => userStoreStub);
rendererDi.override(ipcRendererInjectable, () => ({
const themeStoreStub = { themeOptions: [] } as unknown as ThemeStore; on: jest.fn(),
invoke: jest.fn(), // TODO: replace with proper mocking via the IPC bridge
rendererDi.override(themeStoreInjectable, () => themeStoreStub); } as never));
}); });
rendered = await applicationBuilder.render(); rendered = await applicationBuilder.render();
@@ -27,16 +27,17 @@ exports[`welcome - navigation using application menu when navigating to welcome
style="width: 320px;" style="width: 320px;"
> >
<h2> <h2>
Welcome to Welcome to OpenLens 5!
OpenLens
5!
</h2> </h2>
<p> <p>
To get you started we have auto-detected your clusters in your kubeconfig file and added them to the catalog, your centralized view for managing all your cloud-native resources. To get you started we have auto-detected your clusters in your
kubeconfig file and added them to the catalog, your centralized
view for managing all your cloud-native resources.
<br /> <br />
<br /> <br />
If you have any questions or feedback, please join our If you have any questions or feedback, please join our
<a <a
class="link" class="link"
href="https://join.slack.com/t/k8slens/shared_invite/zt-wcl8jq3k-68R5Wcmk1o95MLBE5igUDQ" href="https://join.slack.com/t/k8slens/shared_invite/zt-wcl8jq3k-68R5Wcmk1o95MLBE5igUDQ"
-2
View File
@@ -14,8 +14,6 @@ const themeStoreInjectable = getInjectable({
ipcRenderer: di.inject(ipcRendererInjectable), ipcRenderer: di.inject(ipcRendererInjectable),
userStore: di.inject(userStoreInjectable), userStore: di.inject(userStoreInjectable),
}), }),
causesSideEffects: true,
}); });
export default themeStoreInjectable; export default themeStoreInjectable;