From 390d4129e64b2b36481425a6f80a94b9d1dc9bc5 Mon Sep 17 00:00:00 2001 From: HesterG Date: Fri, 31 Mar 2023 11:07:53 +0800 Subject: [PATCH 1/2] discriminate pending and running --- templates/repo/commit_status.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/commit_status.tmpl b/templates/repo/commit_status.tmpl index 470869b381c03..d52e151247afa 100644 --- a/templates/repo/commit_status.tmpl +++ b/templates/repo/commit_status.tmpl @@ -1,5 +1,5 @@ {{if eq .State "pending"}} - {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} + {{svg "octicon-dot-fill" 18 "commit-status icon text grey"}} {{end}} {{if eq .State "running"}} {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} From 3d64aed1e7a4f0a020f89d8145a6f48f5d20b9bf Mon Sep 17 00:00:00 2001 From: HesterG Date: Fri, 31 Mar 2023 15:04:21 +0800 Subject: [PATCH 2/2] modify tests --- tests/integration/repo_commits_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index e74e3867f4af9..57ecc4da5f743 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -110,7 +110,7 @@ func testRepoCommitsWithStatus(t *testing.T, resp, respOne *httptest.ResponseRec } func TestRepoCommitsWithStatusPending(t *testing.T) { - doTestRepoCommitWithStatus(t, "pending", "octicon-dot-fill", "yellow") + doTestRepoCommitWithStatus(t, "pending", "octicon-dot-fill", "grey") } func TestRepoCommitsWithStatusSuccess(t *testing.T) { @@ -129,6 +129,10 @@ func TestRepoCommitsWithStatusWarning(t *testing.T) { doTestRepoCommitWithStatus(t, "warning", "gitea-exclamation", "yellow") } +func TestRepoCommitsWithStatusRunning(t *testing.T) { + doTestRepoCommitWithStatus(t, "running", "octicon-dot-fill", "yellow") +} + func TestRepoCommitsStatusParallel(t *testing.T) { defer tests.PrepareTestEnv(t)()