mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix closing-preferences.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
9815f80041
commit
9eed228901
@ -117,7 +117,7 @@ exports[`preferences - closing-preferences given accessing preferences directly
|
||||
class="SubTitle"
|
||||
>
|
||||
Theme
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
@ -202,7 +202,7 @@ exports[`preferences - closing-preferences given accessing preferences directly
|
||||
class="SubTitle"
|
||||
>
|
||||
Extension Install Registry
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
@ -282,16 +282,11 @@ exports[`preferences - closing-preferences given accessing preferences directly
|
||||
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"
|
||||
@ -321,7 +316,7 @@ exports[`preferences - closing-preferences given accessing preferences directly
|
||||
class="SubTitle"
|
||||
>
|
||||
Start-up
|
||||
|
||||
|
||||
</div>
|
||||
<label
|
||||
class="Switch"
|
||||
@ -342,7 +337,7 @@ exports[`preferences - closing-preferences given accessing preferences directly
|
||||
class="SubTitle"
|
||||
>
|
||||
Update Channel
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
@ -427,7 +422,7 @@ exports[`preferences - closing-preferences given accessing preferences directly
|
||||
class="SubTitle"
|
||||
>
|
||||
Locale Timezone
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
@ -820,7 +815,7 @@ exports[`preferences - closing-preferences given already in a page and then navi
|
||||
class="SubTitle"
|
||||
>
|
||||
Theme
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
@ -905,7 +900,7 @@ exports[`preferences - closing-preferences given already in a page and then navi
|
||||
class="SubTitle"
|
||||
>
|
||||
Extension Install Registry
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
@ -985,16 +980,11 @@ exports[`preferences - closing-preferences given already in a page and then navi
|
||||
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"
|
||||
@ -1024,7 +1014,7 @@ exports[`preferences - closing-preferences given already in a page and then navi
|
||||
class="SubTitle"
|
||||
>
|
||||
Start-up
|
||||
|
||||
|
||||
</div>
|
||||
<label
|
||||
class="Switch"
|
||||
@ -1045,7 +1035,7 @@ exports[`preferences - closing-preferences given already in a page and then navi
|
||||
class="SubTitle"
|
||||
>
|
||||
Update Channel
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
@ -1130,7 +1120,7 @@ exports[`preferences - closing-preferences given already in a page and then navi
|
||||
class="SubTitle"
|
||||
>
|
||||
Locale Timezone
|
||||
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="Select theme-lens css-b62m3t-container"
|
||||
|
||||
@ -12,8 +12,6 @@ import { routeInjectionToken } from "../../common/front-end-routing/route-inject
|
||||
import { computed } from "mobx";
|
||||
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 { preferenceNavigationItemInjectionToken } from "../../renderer/components/+preferences/preferences-navigation/preference-navigation-items.injectable";
|
||||
import routeIsActiveInjectable from "../../renderer/routes/route-is-active.injectable";
|
||||
import { Preferences } from "../../renderer/components/+preferences";
|
||||
@ -26,6 +24,7 @@ import { createObservableHistory } from "mobx-observable-history";
|
||||
import navigateToPreferenceTabInjectable from "../../renderer/components/+preferences/preferences-navigation/navigate-to-preference-tab.injectable";
|
||||
import navigateToFrontPageInjectable from "../../common/front-end-routing/navigate-to-front-page.injectable";
|
||||
import { navigateToRouteInjectionToken } from "../../common/front-end-routing/navigate-to-route-injection-token";
|
||||
import ipcRendererInjectable from "../../renderer/app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable";
|
||||
|
||||
describe("preferences - closing-preferences", () => {
|
||||
let applicationBuilder: ApplicationBuilder;
|
||||
@ -45,10 +44,10 @@ describe("preferences - closing-preferences", () => {
|
||||
} 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));
|
||||
|
||||
rendererDi.override(navigateToFrontPageInjectable, (di) => {
|
||||
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user