2

Add review filter and promote decisions panel

This commit is contained in:
2026-03-12 12:01:09 +01:00
parent 8b744d31f3
commit 34d6d3ddcb
2 changed files with 58 additions and 11 deletions

View File

@@ -83,6 +83,9 @@ func TestHandlerServesOverviewAndManualActions(t *testing.T) {
if !strings.Contains(recorder.Body.String(), "Show allowed") {
t.Fatalf("overview page should expose the allowed toggle")
}
if !strings.Contains(recorder.Body.String(), "Review only") {
t.Fatalf("overview page should expose the review-only toggle")
}
if !strings.Contains(recorder.Body.String(), "localStorage") {
t.Fatalf("overview page should persist preferences in localStorage")
}
@@ -103,6 +106,15 @@ func TestHandlerServesOverviewAndManualActions(t *testing.T) {
if strings.Contains(body, `refresh().then(() => investigate());`) {
t.Fatalf("ip details page should not auto-refresh investigation on load")
}
investigationIndex := strings.Index(body, "<h2>Investigation</h2>")
decisionsIndex := strings.Index(body, "<h2>Decisions</h2>")
requestsIndex := strings.Index(body, "<h2>Requests from this IP</h2>")
if investigationIndex == -1 || decisionsIndex == -1 || requestsIndex == -1 {
t.Fatalf("ip details page is missing expected sections")
}
if !(investigationIndex < decisionsIndex && decisionsIndex < requestsIndex) {
t.Fatalf("expected Decisions block right after Investigation block")
}
}
type stubApp struct {