# 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_issue @tdd_issue_590 @tdd_issue_4178
  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_issue @tdd_issue_590 @tdd_issue_4178
  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_issue @tdd_issue_590 @tdd_issue_4178
  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
