From 99a581674d41ba9d8446479fc53d602befb2a559 Mon Sep 17 00:00:00 2001 From: Joe Julian Date: Wed, 1 Apr 2026 17:17:28 -0700 Subject: [PATCH] Align audit UI tests with empty-state model --- main_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main_test.go b/main_test.go index 0e24934..36ed614 100644 --- a/main_test.go +++ b/main_test.go @@ -678,16 +678,16 @@ func TestUIAPIAuditMessagesGuideQuickFilters(t *testing.T) { u := newUIWithSession("desktop", &session.Manager{}) u.showAPIAuditSection() - if got := u.listEmptyMessage(); got != "No API audit events yet. Connect a trusted client, respond to approval prompts, or issue a token to start recording activity." { - t.Fatalf("listEmptyMessage() = %q, want updated API audit guidance", got) + if got := u.listEmptyState(); got.Title != "No API audit events yet" || got.Body != "Connect a trusted client, respond to approval prompts, or issue a token to start recording activity." { + t.Fatalf("listEmptyState() = %#v, want updated API audit guidance", got) } if got := u.detailPlaceholderMessage(); got != "Select an audit event to inspect it, or use Search vault or the quick filters above." { t.Fatalf("detailPlaceholderMessage() = %q, want quick-filter guidance", got) } u.search.SetText("allowed") - if got := u.listEmptyMessage(); got != `No audit events match "allowed". Clear the search or try a different quick filter.` { - t.Fatalf("listEmptyMessage() with search = %q, want quick-filter empty-state guidance", got) + if got := u.listEmptyState(); got.Title != "No matching audit events" || got.Body != `No audit events match "allowed". Clear the search or try a different quick filter.` { + t.Fatalf("listEmptyState() with search = %#v, want quick-filter empty-state guidance", got) } }