@@ -21,7 +21,7 @@ func TestCommandsStyledOutputRendersHumanCatalog(t *testing.T) {
2121 if ! strings .Contains (raw , "CORE COMMANDS" ) {
2222 t .Fatalf ("expected styled catalog heading, got:\n %s" , raw )
2323 }
24- if ! strings .Contains (raw , "auth" ) || ! strings .Contains (raw , "board" ) {
24+ if ! strings .Contains (raw , "auth" ) || ! strings .Contains (raw , "activity" ) || ! strings . Contains ( raw , " board" ) {
2525 t .Fatalf ("expected styled catalog to include commands, got:\n %s" , raw )
2626 }
2727 if strings .Contains (raw , "list, show" ) {
@@ -51,6 +51,25 @@ func TestCommandsFilterRendersMatchingHumanCatalog(t *testing.T) {
5151 }
5252}
5353
54+ func TestCommandsFilterFindsActivity (t * testing.T ) {
55+ mock := NewMockClient ()
56+ SetTestModeWithSDK (mock )
57+ SetTestFormat (output .FormatStyled )
58+ defer resetTest ()
59+
60+ if err := commandsCmd .RunE (commandsCmd , []string {"activity" }); err != nil {
61+ t .Fatalf ("unexpected error: %v" , err )
62+ }
63+
64+ raw := TestOutput ()
65+ if ! strings .Contains (raw , "activity" ) || ! strings .Contains (raw , "list" ) {
66+ t .Fatalf ("expected filtered catalog to include activity list, got:\n %s" , raw )
67+ }
68+ if strings .Contains (raw , "No commands match" ) {
69+ t .Fatalf ("expected activity to be discoverable, got:\n %s" , raw )
70+ }
71+ }
72+
5473func TestCommandsJSONOutputReturnsStructuredCatalog (t * testing.T ) {
5574 mock := NewMockClient ()
5675 result := SetTestModeWithSDK (mock )
0 commit comments