diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index 981628b1ba..5685c26fb9 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -46,7 +46,6 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => { it( "should navigate around common cluster pages", - async () => { const scenariosByParent = pipeline( scenarios, diff --git a/src/common/k8s-api/cluster-context.ts b/src/common/k8s-api/cluster-context.ts index b85d8f74c5..098d92642d 100644 --- a/src/common/k8s-api/cluster-context.ts +++ b/src/common/k8s-api/cluster-context.ts @@ -6,7 +6,7 @@ import type { Cluster } from "../cluster/cluster"; export interface ClusterContext { - cluster?: Cluster; + cluster: Cluster; allNamespaces: string[]; // available / allowed namespaces from cluster.ts contextNamespaces: string[]; // selected by user (see: namespace-select.tsx) hasSelectedAll: boolean; diff --git a/src/renderer/components/+namespaces/store.ts b/src/renderer/components/+namespaces/store.ts index 7eda23a941..1a242839fa 100644 --- a/src/renderer/components/+namespaces/store.ts +++ b/src/renderer/components/+namespaces/store.ts @@ -114,7 +114,7 @@ export class NamespaceStore extends KubeObjectStore { * if user has given static list of namespaces let's not start watches * because watch adds stuff that's not wanted or will just fail */ - if (!this.context?.cluster?.accessibleNamespaces.length) { + if (this.context.cluster.accessibleNamespaces.length > 0) { return noop; } diff --git a/src/renderer/components/kube-object-menu/kube-object-menu.tsx b/src/renderer/components/kube-object-menu/kube-object-menu.tsx index b488bc0937..568c3c6136 100644 --- a/src/renderer/components/kube-object-menu/kube-object-menu.tsx +++ b/src/renderer/components/kube-object-menu/kube-object-menu.tsx @@ -103,11 +103,9 @@ class NonInjectedKubeObjectMenu extends React.Component, WizardSte //because submit MIGHT be called through pressing enter, it might be fired twice. //we'll debounce it to ensure it isn't submit = debounce(() => { - if (this.form?.noValidate && this.form.checkValidity()) { + if (!this.form) { + return; + } + + if (this.form.noValidate || this.form.checkValidity()) { this.next(); } }, 100); @@ -246,7 +250,6 @@ export class WizardStep extends React.Component, WizardSte hidden={hideNextBtn} waiting={waiting ?? this.state.waiting} disabled={disabledNext} - onClick={this.next} /> )} diff --git a/src/renderer/kube-watch-api/kube-watch-api.ts b/src/renderer/kube-watch-api/kube-watch-api.ts index a2c43378d1..c28ea2e794 100644 --- a/src/renderer/kube-watch-api/kube-watch-api.ts +++ b/src/renderer/kube-watch-api/kube-watch-api.ts @@ -77,7 +77,7 @@ export interface SubscribableStore { readonly apiBase: string; readonly kind: string; }; - loadAll(opts?: KubeObjectStoreLoadAllParams): Promise; + loadAll(opts?: KubeObjectStoreLoadAllParams): Promise; subscribe(opts?: KubeObjectStoreSubscribeParams): Disposer; }