Files
aego/app/docs_icons_test.go
sanspie 768a59fdd6
ci-platforms / darwin amd64 smoke (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
GitHub / windows amd64 native GitHub-hosted native CI: failure
GitHub / darwin arm64 native GitHub-hosted native CI: failure
GitHub / darwin amd64 native GitHub-hosted native CI: failure
GitHub / linux amd64 native GitHub-hosted native CI: success
github-native / gitea-pending (push) Skipped
github-native / darwin amd64 native (push) Skipped
github-native / linux amd64 native (push) Skipped
github-native / windows amd64 native (push) Skipped
github-native / darwin arm64 native (push) Skipped
github-native / gitea-result (push) Skipped
ci / checks (push) Failing after 25m31s
ci / build (amd64, linux, ubuntu-24.04) (push) Failing after 9m28s
ci / release (push) Skipped
editor: show documentation navigation icons
2026-11-10 02:20:58 +03:00

43 lines
1.2 KiB
Go

package app
import (
"path/filepath"
"testing"
"aego/app/docicons"
"aego/core/log"
"aego/engine"
"aego/project"
)
func TestEditorHostInstallsDocumentationIconPolicy(t *testing.T) {
p, err := project.Create(filepath.Join(t.TempDir(), "project"), "Docs icons", false)
if err != nil {
t.Fatal(err)
}
h, err := Build(p, Config{Engine: engine.Config{Headless: true}, Logger: log.Nop(), Docs: true, Editor: true, NoProfile: true})
if err != nil {
t.Fatal(err)
}
defer h.Close()
if h.Docs == nil {
t.Fatal("editor host did not build its documentation registry")
}
tasks, refs := docicons.Builtin()
for id, want := range tasks {
if got := h.Docs.NavigationTaskIcon(id); got != want {
t.Errorf("host task %q = %q, want %q", id, got, want)
}
}
for id, want := range refs {
if got := h.Docs.NavigationReferenceIcon(id); got != want {
t.Errorf("host reference %q = %q, want %q", id, got, want)
}
}
for _, id := range []string{"animation", "animation/animator", "render2d.PostProcess", "camera.CameraBrain2D", "aego/audio", "aego/timer", "section/animation"} {
if _, ok := h.Docs.Get(id); !ok {
t.Errorf("editor host lacks module documentation entry %q", id)
}
}
}