aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-12-10 09:57:20 +0800
committerGitHub <noreply@github.com>2024-12-10 01:57:20 +0000
commit1b069dc94ace16168292e0f3c9889d1b356a7507 (patch)
tree6cdf22ad6464632205b8db40f6edb2ea1083e40f /routers
parent43ca67eb8c7838e5e94846904f9116c05980af36 (diff)
downloadgitea-1b069dc94ace16168292e0f3c9889d1b356a7507.tar.gz
gitea-1b069dc94ace16168292e0f3c9889d1b356a7507.zip
Make RepoActionView.vue support `##[group]` (#32770)
Diffstat (limited to 'routers')
-rw-r--r--routers/web/devtest/mock_actions.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/routers/web/devtest/mock_actions.go b/routers/web/devtest/mock_actions.go
index 37e94aa802..46e302d634 100644
--- a/routers/web/devtest/mock_actions.go
+++ b/routers/web/devtest/mock_actions.go
@@ -26,9 +26,9 @@ func generateMockStepsLog(logCur actions.LogCursor) (stepsLog []*actions.ViewSte
"::endgroup::",
"message for: step={step}, cursor={cursor}",
"message for: step={step}, cursor={cursor}",
- "message for: step={step}, cursor={cursor}",
- "message for: step={step}, cursor={cursor}",
- "message for: step={step}, cursor={cursor}",
+ "##[group]test group for: step={step}, cursor={cursor}",
+ "in group msg for: step={step}, cursor={cursor}",
+ "##[endgroup]",
}
cur := logCur.Cursor // usually the cursor is the "file offset", but here we abuse it as "line number" to make the mock easier, intentionally
for i := 0; i < util.Iif(logCur.Step == 0, 3, 1); i++ {
@@ -52,6 +52,10 @@ func MockActionsRunsJobs(ctx *context.Context) {
req := web.GetForm(ctx).(*actions.ViewRequest)
resp := &actions.ViewResponse{}
+ resp.State.Run.TitleHTML = `mock run title <a href="/">link</a>`
+ resp.State.Run.Status = actions_model.StatusRunning.String()
+ resp.State.Run.CanCancel = true
+ resp.State.Run.CanDeleteArtifact = true
resp.Artifacts = append(resp.Artifacts, &actions.ArtifactsViewItem{
Name: "artifact-a",
Size: 100 * 1024,