Files
SuperClaude/tests/test_ui.py
kazuki a4ffe52724 refactor: consolidate PM Agent optimization and pending changes
PM Agent optimization (already committed separately):
- superclaude/commands/pm.md: 1652→14 lines
- superclaude/agents/pm-agent.md: 735→429 lines
- docs/agents/pm-agent-guide.md: new guide file

Other pending changes:
- setup: framework_docs, mcp, logger, remove ui.py
- superclaude: __main__, cli/app, cli/commands/install
- tests: test_ui updates
- scripts: workflow metrics analysis tools
- docs/memory: session state updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 04:54:31 +09:00

53 lines
1.3 KiB
Python

"""
Tests for rich-based UI (modern typer + rich implementation)
Note: Custom UI utilities (setup/utils/ui.py) have been removed.
The new CLI uses typer + rich natively via superclaude/cli/
"""
import pytest
from unittest.mock import patch
from rich.console import Console
from io import StringIO
def test_rich_console_available():
"""Test that rich console is available and functional"""
console = Console(file=StringIO())
console.print("[green]Success[/green]")
# No assertion needed - just verify no errors
def test_typer_cli_imports():
"""Test that new typer CLI can be imported"""
from superclaude.cli.app import app, cli_main
assert app is not None
assert callable(cli_main)
@pytest.mark.integration
def test_cli_help_command():
"""Test CLI help command works"""
from typer.testing import CliRunner
from superclaude.cli.app import app
runner = CliRunner()
result = runner.invoke(app, ["--help"])
assert result.exit_code == 0
assert "SuperClaude Framework CLI" in result.output
@pytest.mark.integration
def test_cli_version_command():
"""Test CLI version command"""
from typer.testing import CliRunner
from superclaude.cli.app import app
runner = CliRunner()
result = runner.invoke(app, ["--version"])
assert result.exit_code == 0
assert "SuperClaude" in result.output