Files
cleveragents-core/features/project_cli_switch.feature
CleverAgents Bot d0e685aed4
CI / load-versions (pull_request) Successful in 17s
CI / push-validation (pull_request) Successful in 25s
CI / quality (pull_request) Successful in 54s
CI / lint (pull_request) Successful in 1m1s
CI / security (pull_request) Successful in 1m9s
CI / typecheck (pull_request) Successful in 1m16s
CI / build (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 36s
CI / unit_tests (pull_request) Successful in 6m3s
CI / docker (pull_request) Successful in 2m16s
CI / integration_tests (pull_request) Successful in 8m28s
CI / coverage (pull_request) Successful in 12m21s
CI / status-check (pull_request) Successful in 3s
fix(cli): add project switch command
ISSUES CLOSED: #8675
2026-06-18 00:57:44 -04:00

43 lines
1.9 KiB
Gherkin

Feature: Project CLI switch command
As a developer
I want to switch between registered projects
So that I can manage my active project without changing directories
Background:
Given a project CLI commands test database is initialized
# switch command
Scenario: switch command with rich output sets active project
Given a project "local/switch-proj" is created in the commands DB
When I invoke project-switch for "local/switch-proj" with yes default format
Then the project cmd output should contain "Active Project Switched"
And the project cmd output should contain "switch-proj"
And the project cmd should succeed
Scenario: switch command with json format
Given a project "local/switch-json" is created in the commands DB
When I invoke project-switch for "local/switch-json" with yes format "json"
Then the project cmd output should contain "active"
And the project cmd JSON data should include "previous" key
Scenario: switch to nonexistent project fails
When I invoke project-switch for "local/ghost-proj" with yes default format
Then the project cmd should fail
Scenario: switch command with yaml format
Given a project "local/switch-yaml" is created in the commands DB
When I invoke project-switch for "local/switch-yaml" with yes format "yaml"
Then the project cmd should succeed
Scenario: switch accepts --yes to skip confirmation
Given a project "local/switch-yes" is created in the commands DB
When I invoke project-switch for "local/switch-yes" with yes and short flag
Then the project cmd output should contain "Active Project Switched"
And the project cmd should succeed
Scenario: switch command can be interrupted by user confirmation denial
Given a project "local/switch-cancel" is created in the commands DB
When I invoke project-switch for "local/switch-cancel" without yes
Then the project cmd should fail