From 7274cdde5033c5214a71070e6e52743dcfaaf763 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 1 Jun 2023 15:52:54 +0200 Subject: [PATCH] chore: include types with void operator for coverage Signed-off-by: Gabriel --- packages/core/src/extensions/lens-renderer-extension.ts | 2 +- .../force-update-modal-root-frame-component.injectable.ts | 2 +- .../catalog/entity-details/component.injectable.tsx | 2 +- ...luster-manager-root-frame-child-component.injectable.tsx | 2 +- ...nd-container-cluster-frame-child-component.injectable.ts | 2 +- ...mmand-container-root-frame-child-component.injectable.ts | 2 +- ...nfirm-dialog-cluster-frame-child-component.injectable.ts | 2 +- .../confirm-dialog-root-frame-child-component.injectable.ts | 2 +- ...uster-dialog-cluster-frame-child-component.injectable.ts | 2 +- ...ease-details-cluster-frame-child-component.injectable.ts | 2 +- ...ject-details-cluster-frame-child-component.injectable.ts | 2 +- ...onfig-dialog-cluster-frame-child-component.injectable.ts | 2 +- ...otifications-cluster-frame-child-component.injectable.ts | 2 +- .../notifications-root-frame-child-component.injectable.ts | 2 +- ...igger-dialog-cluster-frame-child-component.injectable.ts | 2 +- ...scale-dialog-cluster-frame-child-component.injectable.ts | 2 +- ...scale-dialog-cluster-frame-child-component.injectable.ts | 2 +- ...scale-dialog-cluster-frame-child-component.injectable.ts | 2 +- .../cluster-frame-component-registrator.injectable.ts | 2 +- .../cluster-frame-layout-child-component.injectable.tsx | 2 +- .../src/renderer/frames/cluster-frame/cluster-frame.tsx | 4 ++-- packages/core/src/renderer/frames/root-frame/root-frame.tsx | 4 ++-- ...rward-dialog-cluster-frame-child-component.injectable.ts | 2 +- .../react-application/src/react-application.test.tsx | 6 ++++++ 24 files changed, 31 insertions(+), 25 deletions(-) diff --git a/packages/core/src/extensions/lens-renderer-extension.ts b/packages/core/src/extensions/lens-renderer-extension.ts index 76a35eae05..b34f8ef84f 100644 --- a/packages/core/src/extensions/lens-renderer-extension.ts +++ b/packages/core/src/extensions/lens-renderer-extension.ts @@ -26,7 +26,7 @@ import { getExtensionRoutePath } from "../renderer/routes/for-extension"; import type { KubeObjectHandlerRegistration } from "../renderer/kube-object/handler"; import type { AppPreferenceTabRegistration } from "../features/preferences/renderer/compliance-for-legacy-extension-api/app-preference-tab-registration"; import type { KubeObjectDetailRegistration } from "../renderer/components/kube-object-details/kube-object-detail-registration"; -import type { ClusterFrameChildComponent } from "../renderer/frames/cluster-frame/cluster-frame-child-component-injection-token"; +import type { ClusterFrameChildComponent } from "@k8slens/react-application"; import type { EntitySettingRegistration } from "../renderer/components/entity-settings/extension-registrator.injectable"; import type { CatalogEntityDetailRegistration } from "../renderer/components/catalog/entity-details/token"; import type { PageRegistration } from "../renderer/routes/page-registration"; diff --git a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts index b5dd601ad2..9745f51b63 100644 --- a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts +++ b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; -import { rootFrameChildComponentInjectionToken } from "../../../../../../renderer/frames/root-frame/root-frame-child-component-injection-token"; +import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { ForceUpdateModal } from "./force-update-modal"; import timeSinceUpdateWasDownloadedInjectable from "./time-since-update-was-downloaded.injectable"; import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time.injectable"; diff --git a/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx b/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx index 71ab008280..f18e9c76ef 100644 --- a/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx +++ b/packages/core/src/renderer/components/catalog/entity-details/component.injectable.tsx @@ -11,7 +11,7 @@ import React from "react"; import type { CatalogEntity } from "../../../api/catalog-entity"; import type { CatalogEntityRegistry } from "../../../api/catalog/entity/registry"; import catalogEntityRegistryInjectable from "../../../api/catalog/entity/registry.injectable"; -import { rootFrameChildComponentInjectionToken } from "../../../frames/root-frame/root-frame-child-component-injection-token"; +import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application"; import type { HideEntityDetails } from "./hide.injectable"; import hideEntityDetailsInjectable from "./hide.injectable"; import selectedCatalogEntityInjectable from "./selected-entity.injectable"; diff --git a/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx b/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx index a1e6130db9..9993bdec92 100644 --- a/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx +++ b/packages/core/src/renderer/components/cluster-manager/cluster-manager-root-frame-child-component.injectable.tsx @@ -4,7 +4,7 @@ */ import React from "react"; import { getInjectable } from "@ogre-tools/injectable"; -import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token"; +import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { ClusterManager } from "./cluster-manager"; import { computed } from "mobx"; import { ErrorBoundary } from "@k8slens/error-boundary"; diff --git a/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts index b517ab614a..c27f9df4f6 100644 --- a/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/command-palette/command-container-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { CommandContainer } from "./command-container"; -import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const commandContainerClusterFrameChildComponentInjectable = getInjectable({ id: "command-container-cluster-frame-child-component", diff --git a/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts b/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts index f1c7b72180..e90e043909 100644 --- a/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/command-palette/command-container-root-frame-child-component.injectable.ts @@ -3,7 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token"; +import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { computed } from "mobx"; import { CommandContainer } from "./command-container"; diff --git a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts index 196d18b27f..99cb360a5c 100644 --- a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { ConfirmDialog } from "./confirm-dialog"; -import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const confirmDialogClusterFrameChildComponentInjectable = getInjectable({ id: "confirm-dialog-cluster-frame-child-component", diff --git a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts index 0132040818..ff875bd3ad 100644 --- a/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/confirm-dialog/confirm-dialog-root-frame-child-component.injectable.ts @@ -3,7 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token"; +import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { computed } from "mobx"; import { ConfirmDialog } from "./confirm-dialog"; diff --git a/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts index e427768ae9..50ed357c1f 100644 --- a/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/delete-cluster-dialog/delete-cluster-dialog-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { DeleteClusterDialog } from "./view"; -import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const deleteClusterDialogClusterFrameChildComponentInjectable = getInjectable({ id: "delete-cluster-dialog-cluster-frame-child-component", diff --git a/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts index a2293e5ca1..ffb39e6f66 100644 --- a/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/helm-releases/release-details/release-details-cluster-frame-child-component.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; -import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { ReleaseDetails } from "./release-details"; import targetHelmReleaseInjectable from "./target-helm-release.injectable"; diff --git a/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts index 1fcd929325..afd44dd4bc 100644 --- a/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/kube-object-details/kube-object-details-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { KubeObjectDetails } from "./kube-object-details"; -import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const kubeObjectDetailsClusterFrameChildComponentInjectable = getInjectable({ id: "kube-object-details-cluster-frame-child-component", diff --git a/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts index 17160edd81..ccd546f240 100644 --- a/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; -import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { KubeConfigDialog } from "./kubeconfig-dialog"; const kubeconfigDialogClusterFrameChildComponentInjectable = getInjectable({ diff --git a/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts index acd2e72b9e..45f2f3652a 100644 --- a/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/notifications/notifications-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { Notifications } from "./notifications"; -import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const notificationsClusterFrameChildComponentInjectable = getInjectable({ id: "notifications-cluster-frame-child-component", diff --git a/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts b/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts index eec5a1962a..20d83e78fd 100644 --- a/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/notifications/notifications-root-frame-child-component.injectable.ts @@ -3,7 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token"; +import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { computed } from "mobx"; import { Notifications } from "./notifications"; diff --git a/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts index 024515e1b8..0e51db8305 100644 --- a/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/workloads-cronjobs/cron-job-trigger-dialog-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { CronJobTriggerDialog } from "./trigger-dialog/view"; -import { clusterFrameChildComponentInjectionToken } from "../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const cronJobTriggerDialogClusterFrameChildComponentInjectable = getInjectable({ id: "cron-job-trigger-dialog-cluster-frame-child-component", diff --git a/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts index 31a444dba0..a6fcc64d56 100644 --- a/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/workloads-deployments/scale/deployment-scale-dialog-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { DeploymentScaleDialog } from "./dialog"; -import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const deploymentScaleDialogClusterFrameChildComponentInjectable = getInjectable({ id: "deployment-scale-dialog-cluster-frame-child-component", diff --git a/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts index a6f2d8c8f5..0ffd1519b1 100644 --- a/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/workloads-replicasets/scale-dialog/replicaset-scale-dialog-cluster-frame-child-component.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; -import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { ReplicaSetScaleDialog } from "./dialog"; const replicasetScaleDialogClusterFrameChildComponentInjectable = getInjectable({ diff --git a/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts index 7a8b12686d..63ed64439d 100644 --- a/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/components/workloads-statefulsets/scale/statefulset-scale-dialog-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { StatefulSetScaleDialog } from "./dialog"; -import { clusterFrameChildComponentInjectionToken } from "../../../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const statefulsetScaleDialogClusterFrameChildComponentInjectable = getInjectable({ id: "statefulset-scale-dialog-cluster-frame-child-component", diff --git a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts index 31a2db819d..ff631107c3 100644 --- a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts +++ b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.ts @@ -8,7 +8,7 @@ import { map } from "lodash/fp"; import { extensionRegistratorInjectionToken } from "../../../extensions/extension-loader/extension-registrator-injection-token"; import type { ExtensionRegistrator } from "../../../extensions/extension-loader/extension-registrator-injection-token"; import type { LensRendererExtension } from "../../../extensions/lens-renderer-extension"; -import { clusterFrameChildComponentInjectionToken } from "./cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const clusterFrameComponentRegistratorInjectable = getInjectable({ id: "cluster-frame-component-registrator", diff --git a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx index bb73b55665..3f9acdb59f 100644 --- a/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx +++ b/packages/core/src/renderer/frames/cluster-frame/cluster-frame-layout-child-component.injectable.tsx @@ -4,7 +4,7 @@ */ import React from "react"; import { getInjectable } from "@ogre-tools/injectable"; -import { clusterFrameChildComponentInjectionToken } from "./cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; import { MainLayout } from "../../components/layout/main-layout"; import { Sidebar } from "../../components/layout/sidebar"; import { Dock } from "../../components/dock"; diff --git a/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx b/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx index b01b7cfd67..98c1ac7a50 100755 --- a/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx +++ b/packages/core/src/renderer/frames/cluster-frame/cluster-frame.tsx @@ -11,8 +11,8 @@ import namespaceStoreInjectable from "../../components/namespaces/store.injecta import type { SubscribeStores } from "../../kube-watch-api/kube-watch-api"; import { disposer } from "@k8slens/utilities"; import subscribeStoresInjectable from "../../kube-watch-api/subscribe-stores.injectable"; -import type { ClusterFrameChildComponent } from "./cluster-frame-child-component-injection-token"; -import { clusterFrameChildComponentInjectionToken } from "./cluster-frame-child-component-injection-token"; +import type { ClusterFrameChildComponent } from "@k8slens/react-application"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; import watchHistoryStateInjectable from "../../remote-helpers/watch-history-state.injectable"; import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx"; import type { IComputedValue } from "mobx"; diff --git a/packages/core/src/renderer/frames/root-frame/root-frame.tsx b/packages/core/src/renderer/frames/root-frame/root-frame.tsx index 21d3600ea8..1e02371207 100644 --- a/packages/core/src/renderer/frames/root-frame/root-frame.tsx +++ b/packages/core/src/renderer/frames/root-frame/root-frame.tsx @@ -7,8 +7,8 @@ import React from "react"; import { Observer } from "mobx-react"; import { withInjectables } from "@ogre-tools/injectable-react"; import broadcastThatRootFrameIsRenderedInjectable from "./broadcast-that-root-frame-is-rendered.injectable"; -import type { RootFrameChildComponent } from "./root-frame-child-component-injection-token"; -import { rootFrameChildComponentInjectionToken } from "./root-frame-child-component-injection-token"; +import type { RootFrameChildComponent } from "@k8slens/react-application"; +import { rootFrameChildComponentInjectionToken } from "@k8slens/react-application"; interface Dependencies { broadcastThatRootFrameIsRendered: () => void; diff --git a/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts b/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts index eeee6b6751..d67f7ee5e6 100644 --- a/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts +++ b/packages/core/src/renderer/port-forward/port-forward-dialog-cluster-frame-child-component.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { PortForwardDialog } from "./port-forward-dialog"; -import { clusterFrameChildComponentInjectionToken } from "../frames/cluster-frame/cluster-frame-child-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "@k8slens/react-application"; const portForwardDialogClusterFrameChildComponentInjectable = getInjectable({ id: "port-forward-dialog-cluster-frame-child-component", diff --git a/packages/technical-features/react-application/src/react-application.test.tsx b/packages/technical-features/react-application/src/react-application.test.tsx index 12fcdb6bac..2204eefb39 100644 --- a/packages/technical-features/react-application/src/react-application.test.tsx +++ b/packages/technical-features/react-application/src/react-application.test.tsx @@ -16,6 +16,9 @@ import { reactApplicationHigherOrderComponentInjectionToken, } from "./react-application/react-application-higher-order-component-injection-token"; +import { clusterFrameChildComponentInjectionToken } from "./cluster-frame/cluster-frame-child-component-injection-token"; +import { rootFrameChildComponentInjectionToken } from "./root-frame/root-frame-child-component-injection-token"; + const SomeContent = () =>
Some children
; describe("react-application", () => { @@ -43,6 +46,9 @@ describe("react-application", () => { await startApplication(); discover = discoverFor(() => rendered); + + expect(clusterFrameChildComponentInjectionToken.id).toBe("cluster-frame-child-component"); + expect(rootFrameChildComponentInjectionToken.id).toBe("root-frame-child-component"); }); it("renders", () => {