update gui
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user