test(frontend): update tests for type changes
Update all test files to use correct enum values: - AgentPanel, AgentStatusIndicator tests - ProjectHeader, StatusBadge tests - IssueSummary, IssueTable tests - StatusBadge, StatusWorkflow tests (issues) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ const mockProject: Project = {
|
||||
id: 'proj-001',
|
||||
name: 'Test Project',
|
||||
description: 'A test project for unit testing',
|
||||
status: 'in_progress',
|
||||
status: 'active',
|
||||
autonomy_level: 'milestone',
|
||||
created_at: '2025-01-15T00:00:00Z',
|
||||
owner_id: 'user-001',
|
||||
@@ -26,7 +26,7 @@ describe('ProjectHeader', () => {
|
||||
|
||||
it('renders project status badge', () => {
|
||||
render(<ProjectHeader project={mockProject} />);
|
||||
expect(screen.getByText('In Progress')).toBeInTheDocument();
|
||||
expect(screen.getByText('Active')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders autonomy level badge', () => {
|
||||
@@ -44,7 +44,7 @@ describe('ProjectHeader', () => {
|
||||
expect(container.querySelectorAll('.animate-pulse').length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('shows pause button when canPause is true and project is in_progress', () => {
|
||||
it('shows pause button when canPause is true and project is active', () => {
|
||||
const onPauseProject = jest.fn();
|
||||
render(
|
||||
<ProjectHeader
|
||||
@@ -56,7 +56,7 @@ describe('ProjectHeader', () => {
|
||||
expect(screen.getByRole('button', { name: /pause project/i })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('does not show pause button when project is not in_progress', () => {
|
||||
it('does not show pause button when project is not active', () => {
|
||||
const completedProject = { ...mockProject, status: 'completed' as const };
|
||||
render(<ProjectHeader project={completedProject} canPause={true} />);
|
||||
expect(screen.queryByRole('button', { name: /pause project/i })).not.toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user