Files
temp/robot/plan_cli_spec.robot
T
freemo 8891160bd8 fix(cli): add Name and Updated columns to agents plan list table output
- Implemented Updated column in the plan list rich output by extending
  lifecycle_list_plans() in src/cleveragents/cli/commands/plan.py.
  The column is inserted after the existing Project column and before
  Elapsed to maintain logical grouping.
- Added updated_str using plan.timestamps.updated_at.strftime('%Y-%m-%d %H:%M')
  for a human-friendly timestamp in local time.
- Added three Behave scenarios in features/plan_cli_spec_alignment.feature
  to assert presence of Name, Updated, and Invariants columns.
- Added 'When I run plan list with no filters' step definition.
- Added list_columns() function to robot/helper_plan_cli_spec.py verifying
  all three columns with partial header checks due to terminal truncation.
- Added 'Plan List Rich Output Includes Required Columns' test case to
  robot/plan_cli_spec.robot.

ISSUES CLOSED: #2611
2026-04-05 18:15:02 +00:00

62 lines
3.1 KiB
Plaintext

*** Settings ***
Documentation Smoke tests for Plan CLI spec alignment (use/list/status flags)
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} ${CURDIR}/helper_plan_cli_spec.py
*** Test Cases ***
Plan Use Accepts Positional Projects
[Documentation] Verify that ``plan use`` accepts multiple positional projects
${result}= Run Process ${PYTHON} ${HELPER} use-positional-projects cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-use-positional-ok
Plan Use Accepts Automation Profile Flag
[Documentation] Verify that ``plan use --automation-profile`` is accepted
${result}= Run Process ${PYTHON} ${HELPER} use-automation-profile cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-use-profile-ok
Plan Use Accepts Invariant Flag
[Documentation] Verify that ``plan use --invariant`` is accepted (repeatable)
${result}= Run Process ${PYTHON} ${HELPER} use-invariant cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-use-invariant-ok
Plan Use Accepts Actor Override Flags
[Documentation] Verify that plan use accepts actor override flags
${result}= Run Process ${PYTHON} ${HELPER} use-actor-overrides cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-use-actors-ok
Plan Lifecycle List Accepts Filter Flags
[Documentation] Verify that ``plan list`` accepts --phase, --state, --project, --action
${result}= Run Process ${PYTHON} ${HELPER} list-filters cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-list-filters-ok
Plan Status Renders Required Fields
[Documentation] Verify that ``plan status`` renders action_name, phase, state, projects, args, timestamps
${result}= Run Process ${PYTHON} ${HELPER} status-fields cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-status-fields-ok
Plan Cancel Accepts Reason Flag
[Documentation] Verify that ``plan cancel --reason`` is accepted
${result}= Run Process ${PYTHON} ${HELPER} cancel-reason cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-cancel-reason-ok
Plan List Rich Output Includes Required Columns
[Documentation] Verify that ``plan list`` rich output includes Name, Updated, and Invariants columns
${result}= Run Process ${PYTHON} ${HELPER} list-columns cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-cli-list-columns-ok