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") +}