Files
cleveragents-core/features/project_show_after_create.feature
Brent E. Edwards d0689573e0 test(cli): add failing tests for session create DI container error
Add TDD regression tests for bug #570 where `_get_session_service()`
calls `container.db()` but the DI `Container` class has no `db`
provider, raising `AttributeError`.  Same root cause as bug #554.

Includes 4 Behave BDD scenarios tagged `@tdd_bug @tdd_bug_570
@tdd_expected_fail`, Robot Framework integration smoke tests with
`--format plain`, and ASV service-layer benchmarks.  Tests exercise the
real DI path by resetting `_service = None` and using a file-based
SQLite database.

Implements the `@tdd_expected_fail` inversion infrastructure:
- Behave: `after_scenario` hook in `features/environment.py` inverts
  pass/fail for scenarios tagged `@tdd_expected_fail`
- Robot: `robot/tdd_expected_fail_listener.py` listener (API v3)
  performs the same inversion for Robot test cases
- `noxfile.py`: registers the listener via `--listener` in both the
  `integration_tests` and `slow_integration_tests` sessions

Migrates 18 existing TDD scenarios across 5 feature files from the old
`@tdd @bugNNN` convention to the standardised `@tdd_bug @tdd_bug_NNN`
tags per CONTRIBUTING.md § TDD Bug Test Tags.

Refs: #570
2026-03-10 21:39:31 +00:00

30 lines
1.4 KiB
Gherkin

# Regression tests for bug #590: project show must find a project immediately after creation.
Feature: Project show displays a created project
As a developer using the agents CLI
I want "agents project show" to display a project I just created
So that I can verify the project details after creation
Background:
Given a fresh project-show database is initialised
@tdd_bug @tdd_bug_590
Scenario: Show displays a project that was just created
When I create a project named "local/my-app" via the project-show CLI
And I show the project "local/my-app" via the project-show CLI
Then the project-show output should contain "local/my-app"
And the project-show exit code should be 0
@tdd_bug @tdd_bug_590
Scenario: Show displays correct details for a created project with description
When I create a described project named "local/webapp" with description "My web app" via the project-show CLI
And I show the project "local/webapp" via the project-show CLI
Then the project-show output should contain "local/webapp"
And the project-show output should contain "My web app"
And the project-show exit code should be 0
@tdd_bug @tdd_bug_590
Scenario: Show returns error for a project that does not exist
When I show the project "local/nonexistent" via the project-show CLI
Then the project-show output should contain "not found"
And the project-show exit code should not be 0