mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add global override for component observing current time for causing … (#5814)
This commit is contained in:
1 parent
30880276d7
commit
63bd783803
4 files changed
+14
-1
No files matched your search
+3
@@ -31,6 +31,9 @@ const forceUpdateModalRootFrameComponentInjectable = getInjectable({
|
||||
},
|
||||
|
||||
injectionToken: rootFrameChildComponentInjectionToken,
|
||||
|
||||
// Note: Globally overridden because it observes the current time which can cause long running tests
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
export default forceUpdateModalRootFrameComponentInjectable;
|
||||
@@ -69,6 +69,7 @@ import kubeObjectDetailsClusterFrameChildComponentInjectable from "./components/
|
||||
import kubeconfigDialogClusterFrameChildComponentInjectable from "./components/kubeconfig-dialog/kubeconfig-dialog-cluster-frame-child-component.injectable";
|
||||
import portForwardDialogClusterFrameChildComponentInjectable from "./port-forward/port-forward-dialog-cluster-frame-child-component.injectable";
|
||||
import setupSystemCaInjectable from "./frames/root-frame/setup-system-ca.injectable";
|
||||
import forceUpdateModalRootFrameComponentInjectable from "./application-update/force-update-modal/force-update-modal-root-frame-component.injectable";
|
||||
|
||||
export const getDiForUnitTesting = (opts: { doGeneralOverrides?: boolean } = {}) => {
|
||||
const {
|
||||
@@ -119,6 +120,12 @@ export const getDiForUnitTesting = (opts: { doGeneralOverrides?: boolean } = {})
|
||||
shouldRender: computed(() => false),
|
||||
}));
|
||||
|
||||
di.override(forceUpdateModalRootFrameComponentInjectable, () => ({
|
||||
id: "force-update-modal",
|
||||
Component: () => null,
|
||||
shouldRender: computed(() => false),
|
||||
}));
|
||||
|
||||
// TODO: Remove side-effects and shared global state
|
||||
const clusterFrameChildComponentInjectables: Injectable<any, any, any>[] = [
|
||||
commandContainerClusterFrameChildComponentInjectable,
|
||||
|
||||
Reference in new issue
Block a user