Files
cleveragents-core/features/tdd_plan_apply_yes_flag.feature
freemo 8ea00f5185
CI / unit_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / security (push) Has been cancelled
CI / quality (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / build (push) Has been cancelled
CI / push-validation (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / helm (push) Has been cancelled
fix: restore CI quality tests to passing state (#4175)
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-08 11:02:14 +00:00

51 lines
2.3 KiB
Gherkin

@tdd_issue @tdd_issue_932 @tdd_issue_4178
Feature: TDD Issue #932 — plan apply missing --yes flag
As a developer
I want to verify that `agents plan apply` accepts the --yes
flag required by the specification
So that the bug is captured and will be caught by a regression test
These scenarios verify that `apply` correctly handles
`--yes`/`-y` flags as a regression guard. Other destructive CLI
commands (`session delete`, `project delete`, `plan correct`,
`plan rollback`) correctly implement the `--yes`/`-y` pattern to skip
confirmation prompts.
Scenario: apply recognises the --yes long flag
Given a plan CLI runner for the yes-flag test
When I invoke apply with --yes flag and a mocked service
Then the apply --yes invocation should not report an unknown option
And the apply --yes output should not contain the confirmation prompt
And the apply exit code should be 0
And the apply should have called apply
Scenario: apply recognises the -y short flag
Given a plan CLI runner for the yes-flag test
When I invoke apply with -y flag and a mocked service
Then the apply -y invocation should not report an unknown option
And the apply -y output should not contain the confirmation prompt
And the apply exit code should be 0
And the apply should have called apply
Scenario: apply without --yes prompts for confirmation and user declines
Given a plan CLI runner for the yes-flag test
When I invoke apply without --yes and decline
Then the apply output should contain "Apply cancelled."
And the apply exit code should be 0
And the apply should not have called apply
Scenario: apply without --yes prompts for confirmation and user accepts
Given a plan CLI runner for the yes-flag test
When I invoke apply without --yes and accept
Then the apply output should not contain "Apply cancelled."
And the apply output should contain the confirmation prompt
And the apply exit code should be 0
And the apply should have called apply
Scenario: apply catches unexpected exceptions cleanly
Given a plan CLI runner for the yes-flag test
When I invoke apply --yes with a service that raises an unexpected error
Then the apply output should contain "Unexpected error"
And the apply output should not contain "Traceback"
And the apply exit code should be non-zero