From cd0afc4f9095dbd64583c1968f6d4634f26ab815 Mon Sep 17 00:00:00 2001 From: forgejo-backport-action Date: Mon, 22 Dec 2025 00:28:33 +0100 Subject: [PATCH] [v14.0/forgejo] fix(ui): add missing space before 'Commit' back (#10526) **Backport:** https://codeberg.org/forgejo/forgejo/pulls/10521 Regression from 8039240c26a40525da364a5a1308726d6cd973f8 Co-authored-by: Beowulf Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10526 Reviewed-by: Beowulf Co-authored-by: forgejo-backport-action Co-committed-by: forgejo-backport-action --- templates/repo/actions/runs_list.tmpl | 2 +- tests/integration/actions_runs_list_test.go | 26 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/integration/actions_runs_list_test.go diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl index 060fc1b66a..3858ae0849 100644 --- a/templates/repo/actions/runs_list.tmpl +++ b/templates/repo/actions/runs_list.tmpl @@ -16,7 +16,7 @@
{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}} - - {{- if .ScheduleID -}} + {{if .ScheduleID -}} {{ctx.Locale.Tr "actions.runs.scheduled"}} {{- else -}} {{ctx.Locale.Tr "actions.runs.commit"}} diff --git a/tests/integration/actions_runs_list_test.go b/tests/integration/actions_runs_list_test.go new file mode 100644 index 0000000000..790e19d71a --- /dev/null +++ b/tests/integration/actions_runs_list_test.go @@ -0,0 +1,26 @@ +// Copyright 2025 The Forgejo Authors. All rights reserved. +// SPDX-License-Identifier: GPL-3.0-or-later + +package integration + +import ( + "net/http" + "testing" + + "forgejo.org/tests" + + "github.com/stretchr/testify/assert" +) + +func TestActionRunsList(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + req := NewRequest(t, "GET", "/user5/repo4/actions") + resp := MakeRequest(t, req, http.StatusOK) + + htmlDoc := NewHTMLParser(t, resp.Body) + + runSubLine := htmlDoc.Find(".run-list .flex-item-body").Text() + assert.Contains(t, runSubLine, "Commit") + assert.NotContains(t, runSubLine, "-Commit") +}