Files
temp/features/actor_list_empty.feature
T
hurui200320 1878998b7a refactor(testing): rename tdd_bug/tdd_bug_N tags to tdd_issue/tdd_issue_N
Rename the TDD tag system from tdd_bug/tdd_bug_<N> to tdd_issue/tdd_issue_<N>
across the entire codebase. The tdd_expected_fail tag is unchanged.

The TDD expected-failure workflow is not limited to bug fixes — it applies
equally to any issue type (features, tasks, refactors). The _bug suffix was
misleading and narrowed the perceived scope. The new _issue suffix accurately
reflects that the TDD tagging system applies to any Forgejo issue.

Changes span 92 files:
- features/environment.py: validate_tdd_tags(), should_invert_result(), and
  apply_tdd_inversion() updated — regex, variables, error messages
- robot/tdd_expected_fail_listener.py: _validate_tdd_tags(), _should_invert_result(),
  start_test(), end_test() updated consistently
- 33 Behave .feature files: all @tdd_bug/@tdd_bug_<N> tags renamed
- 29 Robot .robot files: all tdd_bug/tdd_bug_<N> tags renamed
- 3 Robot fixture files renamed (tdd_bug_alone, tdd_missing_tdd_bug,
  tdd_expected_fail_missing_bug_n) with content and references updated
- Tag validation tests and helpers updated (function names, command dispatch
  keys, output strings, fixture references)
- CONTRIBUTING.md: section renamed from 'TDD Bug Test Tags' to
  'TDD Issue Test Tags', all tag references and examples updated
- noxfile.py: comment references updated
- Step definition files, mock helpers, and benchmark files: docstring
  references updated

ISSUES CLOSED: #965
2026-03-27 05:58:35 +00:00

55 lines
2.8 KiB
Gherkin

# Regression tests for bug #592: actor list must not raise a validation error.
Feature: Actor list on a fresh project shows no actors
As a developer using the agents CLI
I want "agents actor list" on a fresh project with no actors
So that I see a clean "no actors" message instead of a validation error
# Scenarios 1-2 test CLI rendering of an empty actor list using a
# fully-mocked registry. They verify the user-facing output, NOT the
# buggy code path (which is exercised by Scenario 3 and the edge-case
# scenarios below).
@tdd_issue @tdd_issue_592
Scenario: Actor list with no configured providers shows no actors message
Given the actor registry has no configured providers for actor-list-empty
When I run actor list via the actor-list-empty CLI
Then the actor-list-empty output should contain "No actors"
And the actor-list-empty exit code should be 0
@tdd_issue @tdd_issue_592
Scenario: Actor list does not raise a validation error
Given the actor registry has no configured providers for actor-list-empty
When I run actor list via the actor-list-empty CLI
Then the actor-list-empty output should not contain "VALIDATION_FAILED"
And the actor-list-empty output should not contain "must include exactly one"
And the actor-list-empty exit code should be 0
@tdd_issue @tdd_issue_592
Scenario: Actor list with a multi-slash model provider does not error
Given the actor registry has a provider with a multi-slash model for actor-list-empty
When I run actor list via the actor-list-empty CLI
Then the actor-list-empty exit code should be 0
And the actor-list-empty output should not contain "VALIDATION_FAILED"
@tdd_issue @tdd_issue_592
Scenario: Actor list handles model name with consecutive slashes
Given the actor registry has a provider with model "a//b/c" for actor-list-empty
When I run actor list via the actor-list-empty CLI
Then the actor-list-empty exit code should be 0
And the actor-list-empty output should not contain "VALIDATION_FAILED"
@tdd_issue @tdd_issue_592
Scenario: Actor list handles model name with leading slash
Given the actor registry has a provider with model "/leading-slash" for actor-list-empty
When I run actor list via the actor-list-empty CLI
Then the actor-list-empty exit code should be 0
And the actor-list-empty output should not contain "VALIDATION_FAILED"
@tdd_issue @tdd_issue_592
Scenario: Listed actor name is a valid single-slash namespace/identifier
Given the actor registry has a provider with a multi-slash model for actor-list-empty
When I run actor list via the actor-list-empty CLI
Then the actor-list-empty exit code should be 0
And the upserted actor-list-empty actor name should contain exactly one slash
And the upserted actor-list-empty actor name should be "openrouter/anthropic-claude-sonnet-4-20250514"