Files
cleveragents-core/features/action_cli.feature
T
freemo fd6d41b371
CI / lint (pull_request) Successful in 14s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 16s
CI / integration_tests (pull_request) Successful in 4m15s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 7m41s
CI / docker (pull_request) Successful in 39s
CI / lint (push) Successful in 13s
CI / coverage (pull_request) Successful in 5m38s
CI / typecheck (push) Successful in 26s
CI / security (push) Successful in 22s
CI / quality (push) Successful in 15s
CI / integration_tests (push) Successful in 4m10s
CI / build (push) Successful in 15s
CI / unit_tests (push) Successful in 8m17s
CI / docker (push) Successful in 41s
CI / coverage (push) Successful in 5m30s
feat(domain): align action model with spec
2026-02-13 09:41:28 -05:00

130 lines
5.0 KiB
Gherkin

Feature: Action CLI commands
As a developer
I want to manage actions via CLI commands
So that I can create and use reusable plan templates
Background:
Given an action CLI runner with mocks
And a mocked plan lifecycle service
# Create command tests
Scenario: Create action with required parameters
When I run action CLI create with name "local/test-action" and required parameters
Then the action CLI create should succeed
And the action CLI created name should be "local/test-action"
Scenario: Create action with all parameters
When I run action CLI create with all parameters
Then the action CLI create should succeed
And the action CLI should have specified arguments
Scenario: Create action with --available flag
When I run action CLI create with the available flag
Then the action CLI should create in available state
Scenario: Create action with invalid argument format fails
When I run action CLI create with invalid argument format
Then the action CLI command should abort
Scenario: Create action surfaces validation error
When I run action CLI create with validation error
Then the action CLI should abort with validation error
Scenario: Create action surfaces service error
When I run action CLI create with service error
Then the action CLI should abort with service error
# List command tests
Scenario: List actions shows all actions
Given there are mocked existing actions
When I run action CLI list
Then the action CLI should show all actions in a table
Scenario: List actions with namespace filter
Given there are mocked existing actions
When I run action CLI list with namespace filter "local"
Then the action CLI should show only local namespace actions
Scenario: List actions with available filter
Given there are mocked existing actions
When I run action CLI list with available filter
Then the action CLI should show only available actions
Scenario: List actions with invalid state filter
When I run action CLI list with invalid state "unknown"
Then the action CLI should abort with invalid state
Scenario: List actions handles service error
When I run action CLI list with service error
Then the action CLI should abort with service error
Scenario: List actions when empty
Given there are no mocked actions
When I run action CLI list
Then the action CLI should show no actions message
# Show command tests
Scenario: Show action by name lookup
Given there is a mocked action with name "local/test-action"
When I run action CLI show with name "local/test-action"
Then the action CLI should show the action details
Scenario: Show action by name
Given there is a mocked action with name "local/my-action"
When I run action CLI show with name "local/my-action"
Then the action CLI should show the action details
Scenario: Show action without optional descriptions
Given there is a mocked action without descriptions
When I run action CLI show with name "local/no-description"
Then the action CLI should show the action details
Scenario: Show action not found
When I run action CLI show with unknown ID
Then the action CLI command should abort for missing action
Scenario: Show action handles service error
When I run action CLI show with service error
Then the action CLI should abort with service error
# Available command tests
Scenario: Make action available
Given there is a mocked draft action
When I run action CLI available with the action ID
Then the action CLI should make action available
Scenario: Make action available by name
Given there is a mocked draft action
When I run action CLI available with the action name
Then the action CLI should make action available
And the action CLI should resolve action by name
Scenario: Make already available action fails
Given there is a mocked available action
When I run action CLI available with the action ID
Then the action CLI command should abort with business rule violation
Scenario: Make action available not found
When I run action CLI available with unknown ID
Then the action CLI command should abort for missing action
Scenario: Make action available handles service error
Given there is a mocked draft action
When I run action CLI available with service error
Then the action CLI should abort with service error
# Archive command tests
Scenario: Archive action
Given there is a mocked available action
When I run action CLI archive with the action ID
Then the action CLI should archive the action
Scenario: Archive action not found
When I run action CLI archive with unknown ID
Then the action CLI command should abort for missing action
Scenario: Archive action handles service error
Given there is a mocked available action
When I run action CLI archive with service error
Then the action CLI should abort with service error