46f697bd95
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 22s
CI / security (pull_request) Successful in 26s
CI / typecheck (pull_request) Successful in 29s
CI / build (pull_request) Successful in 14s
CI / coverage (pull_request) Failing after 8m40s
CI / integration_tests (pull_request) Successful in 10m0s
CI / unit_tests (pull_request) Successful in 22m57s
CI / docker (pull_request) Successful in 40s
The 'Test project list command with no projects' scenario was missing a Given step to set up a writable working directory. Without it, the container fell back to CWD/.cleveragents/db.sqlite which could not be opened (directory did not exist), causing sqlite3.OperationalError. - Add 'Given I have a temporary working directory' to the scenario - Bootstrap the SQLite schema in the When step so the ns_projects table exists for the empty-list query
151 lines
5.9 KiB
Gherkin
151 lines
5.9 KiB
Gherkin
Feature: Project Commands Coverage
|
|
As a developer
|
|
I want to test all project command functionality
|
|
So that project.py achieves high code coverage
|
|
|
|
@phase1
|
|
Scenario: Test project init with default parameters
|
|
Given I have a temporary working directory
|
|
When I run project init without any parameters
|
|
Then the project should be initialized in current directory
|
|
And the success message should show project name and location
|
|
And the .cleveragents directory should be created
|
|
|
|
@phase1
|
|
Scenario: Test project init with custom name
|
|
Given I have a temporary working directory
|
|
When I run project init with name "test-project"
|
|
Then the project should be initialized with name "test-project"
|
|
And the success panel should display "test-project"
|
|
|
|
@phase1
|
|
Scenario: Test project init with custom path
|
|
Given I have a temporary working directory
|
|
And I create a subdirectory "myproject"
|
|
When I run project init with path "myproject"
|
|
Then the project should be initialized in "myproject" directory
|
|
And the .cleveragents directory should exist in "myproject"
|
|
|
|
@phase1
|
|
Scenario: Test project init force flag with existing project
|
|
Given I have a temporary working directory
|
|
And I have already initialized a project
|
|
When I execute project init with force option
|
|
Then the project should be reinitialized successfully
|
|
And no error should be raised
|
|
|
|
@phase1
|
|
Scenario: Test project init validation error handling
|
|
Given I have a temporary working directory
|
|
And the project service will raise a ValidationError with details
|
|
When I run project init and it fails with validation error
|
|
Then the error message should be displayed in red
|
|
And the validation error details should be shown
|
|
And the command should abort with ValidationError
|
|
|
|
@phase1
|
|
Scenario: Test project init configuration error handling
|
|
Given I have a temporary working directory
|
|
And the project service will raise a ConfigurationError
|
|
When I run project init and it fails with configuration error
|
|
Then the configuration error message should be displayed
|
|
And the command should abort with ConfigurationError
|
|
|
|
@phase1
|
|
Scenario: Test project init generic CleverAgentsError handling
|
|
Given I have a temporary working directory
|
|
And the project service will raise a CleverAgentsError
|
|
When I run project init and it fails with CleverAgentsError
|
|
Then the generic error message should be displayed
|
|
And the command should abort with CleverAgentsError
|
|
|
|
@phase1
|
|
Scenario: Test project init unexpected exception handling
|
|
Given I have a temporary working directory
|
|
And the project service will raise an unexpected exception
|
|
When I run project init and it fails unexpectedly
|
|
Then the unexpected error message should be displayed
|
|
And the command should abort with generic exception
|
|
|
|
@phase1
|
|
Scenario: Test project status with existing project
|
|
Given I have a temporary working directory
|
|
And I have an initialized project with stats
|
|
When I execute project status command
|
|
Then the project information should be displayed
|
|
And the statistics should include plans count
|
|
And the statistics should include context files count
|
|
And the statistics should include changes count
|
|
And the current plan should be shown
|
|
|
|
@phase1
|
|
Scenario: Test project status with no project
|
|
Given I have a temporary working directory
|
|
And there is no initialized project
|
|
When I execute project status command
|
|
Then an error should show "No project found in current directory"
|
|
And it should suggest running "cleveragents init"
|
|
And the command should exit with code 1
|
|
|
|
@phase1
|
|
Scenario: Test project status error handling
|
|
Given I have a temporary working directory
|
|
And the project service will raise a CleverAgentsError on status
|
|
When I execute project status and it fails
|
|
Then the error message should be shown
|
|
And the command should abort
|
|
|
|
@phase1
|
|
Scenario: Test project list command with no projects
|
|
Given I have a temporary working directory
|
|
When I run project list command
|
|
Then the project list output should contain "No projects found"
|
|
|
|
@phase1
|
|
Scenario: Test project clean command not implemented
|
|
When I run project clean command
|
|
Then it should display "Project cleaning not yet implemented"
|
|
And the command should abort
|
|
|
|
@phase1
|
|
Scenario: Test project clean with confirmation flag
|
|
When I run project clean command with --yes flag
|
|
Then it should display "Project cleaning not yet implemented"
|
|
And the command should abort regardless of confirmation
|
|
|
|
@phase1
|
|
Scenario: Show file filters for current project
|
|
Given I have a temporary working directory
|
|
And I have a mocked project with file filters
|
|
When I run project file-filter show
|
|
Then it should display the current file filters
|
|
And the project command should succeed
|
|
|
|
@phase1
|
|
Scenario: Show file filters when no project exists
|
|
Given I have a temporary working directory
|
|
When I run project file-filter show with no project
|
|
Then it should warn about the missing project
|
|
And the project command should exit with code 1
|
|
|
|
@phase1
|
|
Scenario: Add include and default exclude globs
|
|
Given I have a temporary working directory
|
|
And I have a mocked project with file filters
|
|
When I add file filters include "src/*" exclude "tests/*" with defaults
|
|
Then it should update filters with defaults applied
|
|
|
|
@phase1
|
|
Scenario: Clear file filters when no flags provided
|
|
Given I have a temporary working directory
|
|
And I have a mocked project with file filters
|
|
When I clear project file filters without flags
|
|
Then it should clear both include and exclude filters
|
|
|
|
@phase1
|
|
Scenario: Remove specific include and exclude filters
|
|
Given I have a temporary working directory
|
|
And I have a mocked project with file filters
|
|
When I remove project file filters include "docs/*" exclude "build/*"
|
|
Then it should remove the specified file filters
|