-
实时进度
+
执行进度
任务执行过程中会持续推送每台设备的状态变化。
diff --git a/internal/web/ui_test.go b/internal/web/ui_test.go
index 3ccc294..2ee04da 100644
--- a/internal/web/ui_test.go
+++ b/internal/web/ui_test.go
@@ -2171,3 +2171,18 @@ func TestUI_DeviceWorkspaceContainsSingleDeviceOperations(t *testing.T) {
}
}
}
+
+func TestUI_TaskDetailPresentsExecutionSections(t *testing.T) {
+ ui := newTestUI(t)
+ task, err := ui.tasks.CreateTask("config_apply", []string{"edge-01"}, map[string]any{"config": map[string]any{}})
+ if err != nil {
+ t.Fatalf("create task: %v", err)
+ }
+
+ html := renderPage(t, ui, "/ui/tasks/"+task.ID)
+ for _, text := range []string{"任务概览", "执行进度", "设备结果"} {
+ if !strings.Contains(html, text) {
+ t.Fatalf("expected task detail section %q in html: %s", text, html)
+ }
+ }
+}