Files
cleveragents-core/features/actor_cli_coverage.feature
T

110 lines
3.8 KiB
Gherkin

Feature: Actor CLI coverage
As a developer
I want actor CLI commands covered
So that actor management paths stay stable
Scenario: Add actor without config uses defaults
Given an actor CLI runner
When I run actor add without config
Then the actor add should succeed with default config
Scenario: Add actor with JSON config file
Given an actor CLI runner
And I have an actor JSON config file
When I run actor add with that config
Then the actor add should pass the loaded config
Scenario: Add actor fails when config is missing
Given an actor CLI runner
When I run actor add with missing config path
Then the actor command should fail with bad parameter
Scenario: Add actor rejects non-dictionary config input
Given an actor CLI runner
And I have an actor list config file
When I run actor add with that config
Then the actor command should fail with bad parameter
Scenario: Add actor falls back to YAML-only config
Given an actor CLI runner
And I have an actor YAML-only config file
When I run actor add with that config
Then the actor add should pass the loaded config
Scenario: Add actor treats empty config file as empty dict
Given an actor CLI runner
And I have an empty actor YAML config file
When I run actor add with that config
Then the actor add should pass the loaded config
Scenario: Add actor aborts on business rule violation
Given an actor CLI runner
When I run actor add with business rule violation
Then the actor command should abort with error
Scenario: Update actor from YAML config and safe flag
Given an actor CLI runner
And I have an actor YAML config file returning empty data
When I run actor update with safe flag and yaml config
Then the actor update should set safe and merge config
Scenario: Update actor toggles unsafe flag
Given an actor CLI runner
When I run actor update with unsafe flag
Then the actor update should set unsafe flag
Scenario: Update actor aborts on validation error
Given an actor CLI runner
When I run actor update with validation error
Then the actor command should abort with error
Scenario: Update actor aborts when not found
Given an actor CLI runner
When I run actor update for missing actor
Then the actor command should abort for missing actor
Scenario: Update actor rejects conflicting safety flags
Given an actor CLI runner
When I run actor update with conflicting flags
Then the actor command should fail with bad parameter
Scenario: Remove actor succeeds
Given an actor CLI runner
When I run actor remove successfully
Then the actor remove should succeed
Scenario: Remove actor aborts on validation error
Given an actor CLI runner
When I run actor remove and it fails validation
Then the actor command should abort with error
Scenario: List actors when none exist
Given an actor CLI runner
When I run actor list with no actors
Then the actor list should report empty state
Scenario: List actors with entries
Given an actor CLI runner
When I run actor list with two actors
Then the actor list should render rows
Scenario: Show actor displays details
Given an actor CLI runner
When I run actor show successfully
Then the actor show should display details
Scenario: Show actor aborts on validation error
Given an actor CLI runner
When I run actor show with validation error
Then the actor command should abort with error
Scenario: Set default actor succeeds
Given an actor CLI runner
When I run set-default actor successfully
Then the set default actor should display details
Scenario: Set default actor aborts on business rule violation
Given an actor CLI runner
When I run set-default actor with violation
Then the actor command should abort with error