You've already forked caddy-opnsense-blocker
Polish dashboard readability and loading state
This commit is contained in:
@@ -102,9 +102,15 @@ func TestHandlerServesOverviewAndManualActions(t *testing.T) {
|
||||
if !strings.Contains(recorder.Body.String(), "Top URLs by events") {
|
||||
t.Fatalf("overview page should expose the top URLs block")
|
||||
}
|
||||
if !strings.Contains(recorder.Body.String(), "Loading…") {
|
||||
t.Fatalf("overview page should render stable loading placeholders")
|
||||
}
|
||||
if !strings.Contains(recorder.Body.String(), "These two filters affect both the leaderboards and the Recent IPs list") {
|
||||
t.Fatalf("overview page should explain the scope of the shared filters")
|
||||
}
|
||||
if strings.Contains(recorder.Body.String(), "position: sticky") {
|
||||
t.Fatalf("overview page header should no longer be sticky")
|
||||
}
|
||||
if !strings.Contains(recorder.Body.String(), "Show allowed") {
|
||||
t.Fatalf("overview page should expose the allowed toggle")
|
||||
}
|
||||
@@ -131,6 +137,9 @@ func TestHandlerServesOverviewAndManualActions(t *testing.T) {
|
||||
if strings.Contains(body, `refresh().then(() => investigate());`) {
|
||||
t.Fatalf("ip details page should not auto-refresh investigation on load")
|
||||
}
|
||||
if strings.Contains(body, "position: sticky") {
|
||||
t.Fatalf("ip details page header should no longer be sticky")
|
||||
}
|
||||
investigationIndex := strings.Index(body, "<h2>Investigation</h2>")
|
||||
decisionsIndex := strings.Index(body, "<h2>Decisions</h2>")
|
||||
requestsIndex := strings.Index(body, "<h2>Requests from this IP</h2>")
|
||||
|
||||
Reference in New Issue
Block a user