Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8662c6

Browse files
committed
fix(site): watch build logs while job is pending or running
1 parentcf96d91 commitc8662c6

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,13 @@ test("display pending badge and update it to running when status changes", async
324324
},
325325
};
326326

327-
letcalls=0;
327+
letrunning=false;
328328
server.use(
329329
http.get(
330330
"/api/v2/organizations/:org/templates/:template/versions/:version",
331331
()=>{
332-
calls+=1;
333332
returnHttpResponse.json(
334-
calls>1 ?MockRunningTemplateVersion :MockPendingTemplateVersion,
333+
running ?MockRunningTemplateVersion :MockPendingTemplateVersion,
335334
);
336335
},
337336
),
@@ -348,6 +347,10 @@ test("display pending badge and update it to running when status changes", async
348347
conststatus=awaitscreen.findByRole("status");
349348
expect(status).toHaveTextContent("Pending");
350349

350+
// Manually update the endpoint, as to not rely on the editor page
351+
// making a specific number of requests.
352+
running=true;
353+
351354
awaitwaitFor(
352355
()=>{
353356
expect(status).toHaveTextContent("Running");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp