diff --git a/client/src/components/JobInformation/JobInformation.test.js b/client/src/components/JobInformation/JobInformation.test.js index 68602a1b6ffd..29f3f8d604b3 100644 --- a/client/src/components/JobInformation/JobInformation.test.js +++ b/client/src/components/JobInformation/JobInformation.test.js @@ -67,8 +67,8 @@ describe("JobInformation/JobInformation.vue", () => { // table should exist expect(jobInfoTable).toBeTruthy(); const rows = jobInfoTable.findAll("tr"); - // should contain 9 rows - expect(rows.length).toBe(9); + // should contain 10 rows + expect(rows.length).toBe(10); }); it("stdout and stderr should be rendered", async () => { @@ -96,5 +96,6 @@ describe("JobInformation/JobInformation.vue", () => { { id: "encoded-copied-from-job-id", backend_key: "copied_from_job_id" }, ]; verifyValues(rendered_entries, jobInfoTable, jobResponse); + expect(wrapper.find('td[data-description="galaxy-job-state"]').exists()).toBe(true); }); }); diff --git a/client/src/components/JobInformation/JobInformation.vue b/client/src/components/JobInformation/JobInformation.vue index 22871692e6fe..8e63e8dea2eb 100644 --- a/client/src/components/JobInformation/JobInformation.vue +++ b/client/src/components/JobInformation/JobInformation.vue @@ -39,11 +39,15 @@ const stderr_position = computed(() => stderr_text.value.length); const runTime = computed(() => getJobDuration(job.value)); function jobStateIsTerminal(jobState) { - return jobState && !NON_TERMINAL_STATES.includes(job.value.state); + return jobState && !NON_TERMINAL_STATES.includes(jobState); } -const jobIsTerminal = computed(() => jobStateIsTerminal(job?.value?.state)); +function jobStateIsRunning(jobState) { + return jobState == "running"; +} +const jobIsTerminal = computed(() => jobStateIsTerminal(job?.value?.state)); +const jobIsRunning = computed(() => jobStateIsRunning(job?.value?.state)); const routeToInvocation = computed(() => `/workflows/invocations/${invocationId.value}`); const metadataDetail = ref({ @@ -127,6 +131,7 @@ watch(