fix: observableHistoryInjectionToken and 1 revert for GlobalOverride

Signed-off-by: Gabriel <gaccettola@mirantis.com>
This commit is contained in:
Gabriel authored and Sebastian Malton committed 2023-04-25 17:38:02 -04:00
1 parent db9a3675e1
commit 8c0220c353
22 files changed
+51 -45

No files matched your search

@@ -12,7 +12,7 @@ import { frontEndRouteInjectionToken } from "../../common/front-end-routing/fron
import { computed, runInAction } from "mobx";
import React from "react";
import { routeSpecificComponentInjectionToken } from "../../renderer/routes/route-specific-component-injection-token";
import { observableHistoryInjectable, searchParamsOptions } from "@k8slens/routing";
import { observableHistoryInjectionToken, searchParamsOptions } from "@k8slens/routing";
import { createMemoryHistory } from "history";
import { createObservableHistory } from "mobx-observable-history";
import navigateToFrontPageInjectable from "../../common/front-end-routing/navigate-to-front-page.injectable";
@@ -54,7 +54,7 @@ describe("preferences - closing-preferences", () => {
beforeEach(async () => {
builder.beforeWindowStart(({ windowDi }) => {
windowDi.override(observableHistoryInjectable, () => {
windowDi.override(observableHistoryInjectionToken, () => {
const historyFake = createMemoryHistory({
initialEntries: ["/some-page"],
initialIndex: 0,
@@ -135,7 +135,7 @@ describe("preferences - closing-preferences", () => {
beforeEach(async () => {
builder.beforeWindowStart(({ windowDi }) => {
windowDi.override(observableHistoryInjectable, () => {
windowDi.override(observableHistoryInjectionToken, () => {
const historyFake = createMemoryHistory({
initialEntries: ["/preferences/app"],
initialIndex: 0,
@@ -3,14 +3,14 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { observableHistoryInjectable } from "@k8slens/routing";
import { observableHistoryInjectionToken } from "@k8slens/routing";
import navigateToFrontPageInjectable from "../../../../common/front-end-routing/navigate-to-front-page.injectable";
const closePreferencesInjectable = getInjectable({
id: "close-preferences",
instantiate: (di) => {
const observableHistory = di.inject(observableHistoryInjectable);
const observableHistory = di.inject(observableHistoryInjectionToken);
const navigateToFrontPage = di.inject(navigateToFrontPageInjectable);
return () => {