Skip to content

Commit 8910f3b

Browse files
committed
fix: watch build logs while job is pending or running
1 parent 040e5cf commit 8910f3b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

site/src/modules/templates/useWatchVersionLogs.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export const useWatchVersionLogs = (
2020
return;
2121
}
2222

23-
if (templateVersionStatus !== "running") {
23+
if (
24+
templateVersionStatus !== "running" &&
25+
templateVersionStatus !== "pending"
26+
) {
2427
return;
2528
}
2629

site/src/pages/TemplateVersionEditorPage/TemplateVersionEditorPage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ test("display pending badge and update it to running when status changes", async
331331
() => {
332332
calls += 1;
333333
return HttpResponse.json(
334-
calls > 1 ? MockRunningTemplateVersion : MockPendingTemplateVersion,
334+
calls > 2 ? MockRunningTemplateVersion : MockPendingTemplateVersion,
335335
);
336336
},
337337
),

0 commit comments

Comments
 (0)