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"
>
Theme
</div>
<div
class="Select theme-lens css-b62m3t-container"
@ -192,7 +192,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle"
>
Extension Install Registry
</div>
<div
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"
>
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>
.npmrc
</b>
 file or in the input below.
file or in the input below.
</p>
<div
class="Input theme round black disabled invalid"
@ -311,7 +306,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle"
>
Start-up
</div>
<label
class="Switch"
@ -332,7 +327,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle"
>
Update Channel
</div>
<div
class="Select theme-lens css-b62m3t-container"
@ -417,7 +412,7 @@ exports[`preferences - navigation using application menu when navigating to pref
class="SubTitle"
>
Locale Timezone
</div>
<div
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 { observable } from "mobx";
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";
describe("preferences - navigation to terminal preferences", () => {
@ -27,7 +26,6 @@ describe("preferences - navigation to terminal preferences", () => {
rendererDi.override(userStoreInjectable, () => userStoreStub);
rendererDi.override(defaultShellInjectable, () => "some-default-shell");
rendererDi.permitSideEffects(themeStoreInjectable);
rendererDi.override(ipcRendererInjectable, () => ({
on: jest.fn(),
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 type { UserStore } from "../../common/user-store";
import userStoreInjectable from "../../common/user-store/user-store.injectable";
import type { ThemeStore } from "../../renderer/themes/store";
import themeStoreInjectable from "../../renderer/themes/store.injectable";
import ipcRendererInjectable from "../../renderer/app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable";
describe("preferences - navigation using application menu", () => {
let applicationBuilder: ApplicationBuilder;
@ -27,10 +26,10 @@ describe("preferences - navigation using application menu", () => {
} as unknown as UserStore;
rendererDi.override(userStoreInjectable, () => userStoreStub);
const themeStoreStub = { themeOptions: [] } as unknown as ThemeStore;
rendererDi.override(themeStoreInjectable, () => themeStoreStub);
rendererDi.override(ipcRendererInjectable, () => ({
on: jest.fn(),
invoke: jest.fn(), // TODO: replace with proper mocking via the IPC bridge
} as never));
});
rendered = await applicationBuilder.render();

View File

@ -27,16 +27,17 @@ exports[`welcome - navigation using application menu when navigating to welcome
style="width: 320px;"
>
<h2>
Welcome to
OpenLens
5!
Welcome to OpenLens 5!
</h2>
<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.
<br />
<br />
If you have any questions or feedback, please join our
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 />
If you have any questions or feedback, please join our
<a
class="link"
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),
userStore: di.inject(userStoreInjectable),
}),
causesSideEffects: true,
});
export default themeStoreInjectable;