Add global override for component observing current time for causing … (#5814)

This commit is contained in:
Janne Savolainen authored and GitHub committed 2022-07-08 12:54:23 -04:00
1 parent 30880276d7
commit 63bd783803
4 files changed
+14 -1

No files matched your search

@@ -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;
+7
View File
@@ -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,