Show a log-only artifact icon while a build is running or pending
An in-progress build's artifact page only offers the build command and log — the table now shows an hourglass instead of the document icon (server-rendered rows and the JS-rendered rows alike) until the build finishes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2cb6b1598a
commit
a03f85bc17
@@ -39,5 +39,27 @@ class UiViewsTest : FunSpec() {
|
||||
links.branchUrl("main") shouldBe null
|
||||
links.commitUrl("0123abc") shouldBe null
|
||||
}
|
||||
|
||||
test("rows are in progress while running or pending, so the artifact link shows the log-only icon") {
|
||||
val links = GiteaWebLinks(GiteaConfig())
|
||||
|
||||
fun row(status: String) =
|
||||
BuildRowView.from(
|
||||
BranchDto(
|
||||
branch = "main",
|
||||
commit = "0123abc",
|
||||
status = status,
|
||||
startedAt = null,
|
||||
durationSeconds = null,
|
||||
artifactKey = "some-key",
|
||||
),
|
||||
links,
|
||||
)
|
||||
|
||||
row("running").inProgress shouldBe true
|
||||
row("pending").inProgress shouldBe true
|
||||
row("success").inProgress shouldBe false
|
||||
row("failed").inProgress shouldBe false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user