Align audit UI tests with empty-state model
This commit is contained in:
+4
-4
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user