From 0eb7eeeb8a2e2e7c6ab34b9fbc7aea4868b4dd61 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:56:29 +0200 Subject: [PATCH] Ensure task expiration has precedence over any other state --- .../Common/PersistentTaskProgressMonitorAlert.test.ts | 3 ++- .../Common/PersistentTaskProgressMonitorAlert.vue | 8 ++++---- client/src/composables/persistentProgressMonitor.ts | 6 ++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/client/src/components/Common/PersistentTaskProgressMonitorAlert.test.ts b/client/src/components/Common/PersistentTaskProgressMonitorAlert.test.ts index 44bc70cfebfa..f9e63f915c39 100644 --- a/client/src/components/Common/PersistentTaskProgressMonitorAlert.test.ts +++ b/client/src/components/Common/PersistentTaskProgressMonitorAlert.test.ts @@ -191,9 +191,10 @@ describe("PersistentTaskProgressMonitorAlert.vue", () => { expect(completedAlert.text()).not.toContain("Download here"); }); - it("should render a warning alert when the task has expired", () => { + it("should render a warning alert when the task has expired even if the status is running", () => { const useMonitor = { ...FAKE_MONITOR, + isRunning: ref(true), }; const existingMonitoringData: MonitoringData = { taskId: "1", diff --git a/client/src/components/Common/PersistentTaskProgressMonitorAlert.vue b/client/src/components/Common/PersistentTaskProgressMonitorAlert.vue index 4c821e858c1c..34467f095646 100644 --- a/client/src/components/Common/PersistentTaskProgressMonitorAlert.vue +++ b/client/src/components/Common/PersistentTaskProgressMonitorAlert.vue @@ -107,13 +107,13 @@ function dismissAlert() {