update gui

This commit is contained in:
2026-07-28 21:20:38 -05:00
parent 444dc140b2
commit 64ee9da494
7 changed files with 41 additions and 0 deletions
+29
View File
@@ -8,6 +8,35 @@ import (
"time"
)
func TestEveryPageUsesStandaloneLogoMarkAsFavicon(t *testing.T) {
t.Parallel()
for _, file := range []string{
"templates/audit.html",
"templates/hosts.html",
"templates/login.html",
"templates/packages.html",
"templates/portal.html",
} {
content, err := webFiles.ReadFile(file)
if err != nil {
t.Fatal(err)
}
if !strings.Contains(
string(content),
`<link rel="icon" type="image/svg+xml" href="/static/ta-mark.svg">`,
) {
t.Errorf("%s does not reference the standalone logo favicon", file)
}
}
mark, err := webFiles.ReadFile("static/ta-mark.svg")
if err != nil {
t.Fatal(err)
}
if bytes.Count(mark, []byte("<polygon")) != 4 {
t.Fatal("standalone logo favicon does not contain the four original mark polygons")
}
}
func TestPortalTemplateExecutes(t *testing.T) {
t.Parallel()
templates, err := parseTemplates(time.UTC)