1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-04-21 13:04:13 -04:00
parent 2684b4c130
commit 4fcfdae240
5 changed files with 20 additions and 29 deletions

View File

@ -107,7 +107,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle" class="SubTitle"
> >
Theme Theme
</div> </div>
<div <div
class="Select theme-lens css-b62m3t-container" class="Select theme-lens css-b62m3t-container"
@ -192,7 +192,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle" class="SubTitle"
> >
Extension Install Registry Extension Install Registry
</div> </div>
<div <div
class="Select theme-lens css-b62m3t-container" class="Select theme-lens css-b62m3t-container"
@ -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"
@ -311,7 +306,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle" class="SubTitle"
> >
Start-up Start-up
</div> </div>
<label <label
class="Switch" class="Switch"
@ -332,7 +327,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle" class="SubTitle"
> >
Update Channel Update Channel
</div> </div>
<div <div
class="Select theme-lens css-b62m3t-container" class="Select theme-lens css-b62m3t-container"
@ -417,7 +412,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle" class="SubTitle"
> >
Locale Timezone Locale Timezone
</div> </div>
<div <div
class="Select theme-lens css-b62m3t-container" class="Select theme-lens css-b62m3t-container"

View File

@ -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

View File

@ -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();

View File

@ -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
<br />
<br />
If you have any questions or feedback, please join our
kubeconfig file and added them to the catalog, your centralized
view for managing all your cloud-native resources.
<br />
<br />
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"

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;