diff --git a/features/automation_profile_cli.feature b/features/automation_profile_cli.feature index 653730f08..a28883860 100644 --- a/features/automation_profile_cli.feature +++ b/features/automation_profile_cli.feature @@ -167,7 +167,17 @@ Feature: Automation Profile CLI commands Given a custom profile "acme/strict" has been added When I run automation-profile remove "acme/strict" with --yes Then the automation-profile remove should succeed - And the automation-profile output should contain "removed" + And the automation-profile output should contain "Profile Removed" + And the automation-profile output should contain "Name:" + And the automation-profile output should contain "OK" + + Scenario: Remove custom profile shows Profile Removed panel + Given a custom profile "acme/panel-test" has been added + When I run automation-profile remove "acme/panel-test" with --yes + Then the automation-profile remove should succeed + And the automation-profile output should contain "Profile Removed" + And the automation-profile output should contain "acme/panel-test" + And the automation-profile output should contain "OK" Scenario: Remove built-in profile fails When I run automation-profile remove "manual" with --yes diff --git a/robot/helper_automation_profile_cli.py b/robot/helper_automation_profile_cli.py index d81077983..d1a71ebca 100644 --- a/robot/helper_automation_profile_cli.py +++ b/robot/helper_automation_profile_cli.py @@ -213,7 +213,7 @@ def test_list_json() -> None: def test_remove_profile() -> None: - """Test removing a custom profile.""" + """Test removing a custom profile - verifies Profile Removed panel is rendered.""" _reset_service() # First add a profile fd, path = tempfile.mkstemp(suffix=".yaml") @@ -228,7 +228,16 @@ def test_remove_profile() -> None: # Then remove it (reuse same service so the profile persists) result = _invoke(["remove", "acme/robot-test", "--yes"]) assert result.exit_code == 0, f"remove failed: {result.output}" - assert "removed" in result.output.lower() + # Verify the spec-required Profile Removed panel is rendered + assert "Profile Removed" in result.output, ( + f"Expected 'Profile Removed' panel in output. Got: {result.output}" + ) + assert "acme/robot-test" in result.output, ( + f"Expected profile name in panel output. Got: {result.output}" + ) + assert "OK" in result.output, ( + f"Expected 'OK' success message in output. Got: {result.output}" + ) print("remove-profile-ok") diff --git a/src/cleveragents/cli/commands/automation_profile.py b/src/cleveragents/cli/commands/automation_profile.py index 1c5baab8e..2fc2c99d6 100644 --- a/src/cleveragents/cli/commands/automation_profile.py +++ b/src/cleveragents/cli/commands/automation_profile.py @@ -308,7 +308,9 @@ def remove_profile( console.print(format_output(data, fmt)) return - console.print(f"[green]✓[/green] Automation profile removed: {name}") + panel = Panel(f"[bold cyan]Name:[/bold cyan] {name}", title="Profile Removed") + console.print(panel) + console.print("[green]✓ OK[/green] Profile removed") except NotFoundError as exc: console.print(f"[red]Profile not found:[/red] '{name}'")