Files
cleveragents-core/features/actor_cli_coverage_boost.feature

66 lines
2.7 KiB
Gherkin

Feature: Actor CLI coverage boost
Cover uncovered lines in src/cleveragents/cli/commands/actor.py
# ---------- _get_services (lines 180-185) ----------
Scenario: _get_services returns actor_service and actor_registry when container has registry
Given a mock container with actor_registry
When I call _get_services
Then I should receive both actor_service and actor_registry
Scenario: _get_services returns actor_service and None when container lacks registry
Given a mock container without actor_registry
When I call _get_services
Then I should receive actor_service and None for registry
# ---------- _actor_spec_dict with graph_descriptor (line 311) ----------
Scenario: _actor_spec_dict includes graph_descriptor when present on actor
Given an actor with a graph_descriptor
When I call _actor_spec_dict on that actor
Then the result dict should contain the graph_descriptor key
Scenario: _actor_spec_dict omits graph_descriptor when None on actor
Given an actor without a graph_descriptor
When I call _actor_spec_dict on that actor
Then the result dict should not contain the graph_descriptor key
# ---------- set_default via service fallback (line 665) ----------
Scenario: set-default falls back to service when registry is None
Given an actor CLI test runner
When I run set-default via the service path
Then the service set_default_actor should be called
And the set-default output should contain the actor name
Scenario: set-default via service aborts on NotFoundError
Given an actor CLI test runner
When I run set-default via service for a missing actor
Then the set-default command should abort with an error
# ---------- _print_actor non-rich format with graph_descriptor ----------
Scenario: _print_actor uses format_output for non-rich format with graph_descriptor
Given an actor with a graph_descriptor
When I print that actor in json format
Then the json output should contain the graph_descriptor
# ---------- list_actors via service fallback ----------
Scenario: list_actors falls back to service when registry is None
Given an actor CLI test runner
When I run actor list via service with actors
Then the actor list output should contain actor names
Scenario: list_actors non-rich format via service
Given an actor CLI test runner
When I run actor list via service in json format
Then the actor list json output should be valid
# ---------- show actor via service fallback ----------
Scenario: show actor falls back to service when registry is None
Given an actor CLI test runner
When I run actor show via service path
Then the show output should contain the actor name