From c13c0e15f38e7a047a526d97d9dcf695363b8ddf Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Wed, 6 Jul 2022 15:23:31 +0300 Subject: [PATCH] Kludge "isEnabledForCluster" work again for kube object status texts Signed-off-by: Janne Savolainen --- ...when-cluster-is-not-relevant.test.tsx.snap | 1181 +++++++++++++++++ ...uses-when-cluster-is-not-relevant.test.tsx | 160 +++ .../kube-object-status-icon.test.tsx | 126 +- .../kube-object-status-icon.tsx | 11 +- ...kube-object-status-text-injection-token.ts | 20 + ...ject-status-text-registrator.injectable.ts | 55 + ...ject-status-texts-for-object.injectable.ts | 42 + .../kube-object-status-texts.injectable.ts | 23 + .../status-registrations.injectable.ts | 21 - .../statuses-for-kube-object.injectable.ts | 35 - 10 files changed, 1545 insertions(+), 129 deletions(-) create mode 100644 src/behaviours/cluster/kube-object-status-icon/extension-api/__snapshots__/disable-kube-object-statuses-when-cluster-is-not-relevant.test.tsx.snap create mode 100644 src/behaviours/cluster/kube-object-status-icon/extension-api/disable-kube-object-statuses-when-cluster-is-not-relevant.test.tsx create mode 100644 src/renderer/components/kube-object-status-icon/kube-object-status-text-injection-token.ts create mode 100644 src/renderer/components/kube-object-status-icon/kube-object-status-text-registrator.injectable.ts create mode 100644 src/renderer/components/kube-object-status-icon/kube-object-status-texts-for-object.injectable.ts create mode 100644 src/renderer/components/kube-object-status-icon/kube-object-status-texts.injectable.ts delete mode 100644 src/renderer/components/kube-object-status-icon/status-registrations.injectable.ts delete mode 100644 src/renderer/components/kube-object-status-icon/statuses-for-kube-object.injectable.ts diff --git a/src/behaviours/cluster/kube-object-status-icon/extension-api/__snapshots__/disable-kube-object-statuses-when-cluster-is-not-relevant.test.tsx.snap b/src/behaviours/cluster/kube-object-status-icon/extension-api/__snapshots__/disable-kube-object-statuses-when-cluster-is-not-relevant.test.tsx.snap new file mode 100644 index 0000000000000..3cb2d5076b6ed --- /dev/null +++ b/src/behaviours/cluster/kube-object-status-icon/extension-api/__snapshots__/disable-kube-object-statuses-when-cluster-is-not-relevant.test.tsx.snap @@ -0,0 +1,1181 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`disable kube object statuses when cluster is not relevant given extension should be enabled for the cluster, when navigating renders 1`] = ` + +
+
+
+