forked from HAL9000/cleveragents-core
8ea00f5185
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
29 lines
1.5 KiB
Gherkin
29 lines
1.5 KiB
Gherkin
@tdd_issue @tdd_issue_783 @tdd_issue_4178
|
|
Feature: TDD Issue #783 — agents init --yes should not require user input
|
|
As a developer
|
|
I want to verify that `agents init --yes` completes without any user
|
|
input prompts
|
|
So that the bug is captured and will be caught by a regression test
|
|
|
|
The root cause is that `init_command()` in project.py receives the
|
|
`--yes` flag but does not pass it through to the migration runner.
|
|
The migration runner's `_default_prompt_for_migration` uses
|
|
`typer.confirm()` when a TTY is detected, causing the command to block
|
|
for user input even when `--yes` was specified.
|
|
|
|
Scenario: Init with --yes completes without stdin
|
|
Given a fresh environment for tdd-init-yes-no-input
|
|
When I invoke agents init --yes with no stdin
|
|
Then the tdd-init-yes-no-input command should exit successfully
|
|
And the tdd-init-yes-no-input output should not contain "Apply migrations now"
|
|
|
|
# Note: While the bug is present, the first assertion (exit code 0) will
|
|
# fail and Behave will skip subsequent steps. This means the "contains
|
|
# Initialized" assertion is only evaluated after the bug is fixed, at
|
|
# which point this scenario provides distinct post-fix regression value.
|
|
Scenario: Init with --yes does not prompt for migration approval
|
|
Given a fresh environment for tdd-init-yes-no-input
|
|
When I invoke agents init --yes with no stdin
|
|
Then the tdd-init-yes-no-input command should exit successfully
|
|
And the tdd-init-yes-no-input output should contain "Initialized"
|