From 7df036f1a50270b15c58084bb4f2502b66d562ae Mon Sep 17 00:00:00 2001 From: Hester Gong Date: Fri, 31 Mar 2023 17:24:39 +0800 Subject: [PATCH] Use different SVG for pending and running actions (#23836) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: 截屏2023-03-31 11 12 17 截屏2023-03-31 11 10 48 After: 截屏2023-03-31 11 05 44 截屏2023-03-31 11 06 56 --- templates/repo/commit_status.tmpl | 2 +- tests/integration/repo_commits_test.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/repo/commit_status.tmpl b/templates/repo/commit_status.tmpl index 470869b381..d52e151247 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"}} diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index e74e3867f4..57ecc4da5f 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)()