90 lines
4.6 KiB
Gherkin
90 lines
4.6 KiB
Gherkin
Feature: Plan CLI streaming and helper function coverage
|
|
As a developer
|
|
I want to test uncovered paths in plan.py
|
|
So that _print_lifecycle_plan, _get_current_project, and programmatic wrappers reach full coverage
|
|
|
|
Scenario: _print_lifecycle_plan with non-lifecycle plan falls back
|
|
Given I have a temporary test directory
|
|
When I call print_lifecycle_plan with a non-lifecycle plan object
|
|
Then the fallback display path should be used for non-lifecycle plan
|
|
|
|
Scenario: _print_lifecycle_plan with error_message shows error
|
|
Given I have a temporary test directory
|
|
When I call print_lifecycle_plan with a lifecycle plan that has an error_message
|
|
Then the lifecycle plan error_message should appear in the output
|
|
|
|
Scenario: _print_lifecycle_plan with long description truncates
|
|
Given I have a temporary test directory
|
|
When I call print_lifecycle_plan with a description longer than 200 characters
|
|
Then the lifecycle plan description should be truncated with ellipsis
|
|
|
|
Scenario: _print_lifecycle_plan with empty project_names
|
|
Given I have a temporary test directory
|
|
When I call print_lifecycle_plan with a lifecycle plan with no project links
|
|
Then the lifecycle plan output should show projects as none
|
|
|
|
Scenario: _get_current_project returns project successfully
|
|
Given I have a temporary test directory
|
|
When I call the get_current_project helper with a valid project
|
|
Then the get_current_project helper should return the mock project
|
|
|
|
Scenario: _get_current_project with no project aborts
|
|
Given I have a temporary test directory
|
|
When I call the get_current_project helper with no project available
|
|
Then the get_current_project helper should raise typer Abort
|
|
|
|
Scenario: tell_command programmatic wrapper calls services
|
|
Given I have a temporary test directory
|
|
When I invoke the plan tell_command programmatic wrapper with valid project and prompt
|
|
Then the plan tell_command programmatic wrapper should call create_plan
|
|
|
|
Scenario: tell_command programmatic wrapper with no project raises
|
|
Given I have a temporary test directory
|
|
When I invoke the plan tell_command programmatic wrapper with no project
|
|
Then the plan tell_command programmatic wrapper should raise CleverAgentsError
|
|
|
|
Scenario: build_command programmatic wrapper returns changes
|
|
Given I have a temporary test directory
|
|
When I invoke the plan build_command programmatic wrapper with valid project
|
|
Then the plan build_command programmatic wrapper should return the changes list
|
|
|
|
Scenario: build_command programmatic wrapper with no project raises
|
|
Given I have a temporary test directory
|
|
When I invoke the plan build_command programmatic wrapper with no project
|
|
Then the plan build_command programmatic wrapper should raise CleverAgentsError
|
|
|
|
Scenario: apply_command programmatic wrapper applies changes
|
|
Given I have a temporary test directory
|
|
When I invoke the plan apply_command programmatic wrapper with valid project
|
|
Then the plan apply_command programmatic wrapper should return applied count
|
|
|
|
Scenario: new_command programmatic wrapper creates plan
|
|
Given I have a temporary test directory
|
|
When I invoke the plan new_command programmatic wrapper with valid project
|
|
Then the plan new_command programmatic wrapper should call new_plan
|
|
|
|
Scenario: current_command programmatic wrapper returns plan
|
|
Given I have a temporary test directory
|
|
When I invoke the plan current_command programmatic wrapper with valid project
|
|
Then the plan current_command programmatic wrapper should return the plan
|
|
|
|
Scenario: list_command programmatic wrapper returns plans
|
|
Given I have a temporary test directory
|
|
When I invoke the plan list_command programmatic wrapper with valid project
|
|
Then the plan list_command programmatic wrapper should return the plans list
|
|
|
|
Scenario: cd_command programmatic wrapper switches plan
|
|
Given I have a temporary test directory
|
|
When I invoke the plan cd_command programmatic wrapper with valid project
|
|
Then the plan cd_command programmatic wrapper should call switch_to_plan
|
|
|
|
Scenario: continue_command programmatic wrapper with prompt
|
|
Given I have a temporary test directory
|
|
When I invoke the plan continue_command programmatic wrapper with prompt and valid project
|
|
Then the plan continue_command programmatic wrapper should call continue_plan
|
|
|
|
Scenario: continue_command programmatic wrapper without prompt and no plan
|
|
Given I have a temporary test directory
|
|
When I invoke the plan continue_command programmatic wrapper without prompt and no current plan
|
|
Then the plan continue_command programmatic wrapper should raise CleverAgentsError for no plan
|