Files
cleveragents-core/robot/cli_init_yes_flag.robot
brent.edwards 4e3bf7d3ad
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 18s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 35s
CI / unit_tests (pull_request) Successful in 2m26s
CI / integration_tests (pull_request) Successful in 3m12s
CI / docker (pull_request) Successful in 46s
CI / coverage (pull_request) Successful in 4m40s
CI / benchmark-regression (pull_request) Successful in 29m26s
test(cli): add failing tests for agents init --yes missing option
Add TDD-style Behave BDD tests for the missing agents init --yes flag
(bug #522). Five Gherkin scenarios cover: exit code validation, prompt
suppression, -y alias, output summary fields, and interactive-mode
regression guard. Includes Robot Framework smoke tests (tagged @wip)
and ASV benchmarks.

Configure behave.ini to exclude @wip scenarios globally and noxfile.py
to exclude wip-tagged Robot suites, so TDD-failing tests do not break CI.

Review feedback addressed:
- Remove unnecessary # type: ignore from benchmark (outside Pyright scope)
- Fix Then...Then to Then...And in Gherkin (L1)
- Fix CHANGELOG 'three scenarios' to 'five scenarios' (L2)
- Add behave.ini documentation for @wip workaround (Aditya F1)
- Rename Scenario 2 title to 'suppresses interactive prompts' (Aditya F2)

Closes #536
2026-03-06 20:28:37 +00:00

53 lines
2.7 KiB
Plaintext

*** Settings ***
Documentation Integration smoke test for agents init --yes (bug #522).
... These tests are TDD-style and expected to FAIL until the
... bug fix is applied.
Resource ${CURDIR}/common.resource
Library Process
Library OperatingSystem
Library String
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Test Cases ***
Init Yes Flag Exits Without Error
[Documentation] agents init --yes should complete with exit code 0
[Tags] wip
${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='init_yes_')
${result}= Run Process ${PYTHON} -m cleveragents init --yes
... timeout=60s cwd=${tmpdir}
Should Be Equal As Integers ${result.rc} 0
... msg=Expected exit code 0 but got ${result.rc}. stderr: ${result.stderr}
[Teardown] Remove Directory ${tmpdir} recursive=True
Init Yes Flag Produces Summary Output
[Documentation] agents init --yes should produce the initialization summary
... with all spec-required output fields.
[Tags] wip
${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='init_yes_out_')
${result}= Run Process ${PYTHON} -m cleveragents init --yes
... timeout=60s cwd=${tmpdir}
Should Be Equal As Integers ${result.rc} 0
... msg=Expected exit code 0 but got ${result.rc}. stderr: ${result.stderr}
Should Contain ${result.stdout} Initialized (non-interactive)
... msg=Output should contain non-interactive initialization message per spec
Should Contain ${result.stdout} Data Dir:
... msg=Output should contain Data Dir field per spec
Should Contain ${result.stdout} Config:
... msg=Output should contain Config field per spec
Should Contain ${result.stdout} Database:
... msg=Output should contain Database field per spec
Should Contain ${result.stdout} Directories:
... msg=Output should contain Directories field per spec
[Teardown] Remove Directory ${tmpdir} recursive=True
Init Short Y Flag Exits Without Error
[Documentation] agents init -y should complete with exit code 0 (short-form alias)
[Tags] wip
${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='init_y_')
${result}= Run Process ${PYTHON} -m cleveragents init -y
... timeout=60s cwd=${tmpdir}
Should Be Equal As Integers ${result.rc} 0
... msg=Expected exit code 0 but got ${result.rc}. stderr: ${result.stderr}
[Teardown] Remove Directory ${tmpdir} recursive=True