From 868586183fd9d62b765fb49688658e2e82ac9c26 Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Thu, 11 Apr 2024 11:37:07 -0400 Subject: [PATCH] consider PendingChartCreation as part of upgrade process (#4544) --- web/src/utilities/utilities.js | 3 ++- web/src/utilities/utilities.test.js | 32 ++++++++++++++++++----------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/web/src/utilities/utilities.js b/web/src/utilities/utilities.js index ec0c27a6c6..3c8f189c1d 100644 --- a/web/src/utilities/utilities.js +++ b/web/src/utilities/utilities.js @@ -681,7 +681,8 @@ export const Utilities = { const normalizedState = this.clusterState(cluster.state); if ( normalizedState === "Upgrading" || - normalizedState === "Upgrading addons" + normalizedState === "Upgrading addons" || + normalizedState === "Creating addons" ) { return true; } diff --git a/web/src/utilities/utilities.test.js b/web/src/utilities/utilities.test.js index 5911813c05..12d4ea9028 100644 --- a/web/src/utilities/utilities.test.js +++ b/web/src/utilities/utilities.test.js @@ -85,20 +85,28 @@ describe("Utilities", () => { }); it("should return true if the user has tried to deploy the current version and a cluster upgrade is in progress", () => { - const apps = [ - { - downstream: { - currentVersion: { - status: "deployed", - }, - cluster: { - requiresUpgrade: true, - state: "Installing", + for (const installationState of [ + "CopyingArtifacts", + "Enqueued", + "Installing", + "AddonsInstalling", + "PendingChartCreation", + ]) { + const apps = [ + { + downstream: { + currentVersion: { + status: "deployed", + }, + cluster: { + requiresUpgrade: true, + state: installationState, + }, }, }, - }, - ]; - expect(Utilities.shouldShowClusterUpgradeModal(apps)).toBe(true); + ]; + expect(Utilities.shouldShowClusterUpgradeModal(apps)).toBe(true); + } }); it("should return false if there are is one installation that does not have a state", () => {