Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(test): align conversation fixtures with migrated profiles

Steven Enamakel35ccf39d81f5
diff --git a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx b/app/src/features/conversations/Conversations.processSourceCommand.test.tsx
index 0ceed83b64..021a8e20b5 100644
--- a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx
+++ b/app/src/features/conversations/Conversations.processSourceCommand.test.tsx
@@ -27,9 +27,22 @@ import themeReducer from '../../store/themeSlice';
import threadReducer from '../../store/threadSlice';
import type { Thread } from '../../types/thread';
-const { mockGetThreads, mockGetThreadMessages } = vi.hoisted(() => ({
+const { mockGetThreads, mockGetThreadMessages, mockUseUsageState } = vi.hoisted(() => ({
mockGetThreads: vi.fn().mockResolvedValue({ threads: [], count: 0 }),
mockGetThreadMessages: vi.fn().mockResolvedValue({ messages: [], count: 0 }),
+ mockUseUsageState: vi.fn(() => ({
+ teamUsage: null,
+ currentPlan: null,
+ currentTier: 'FREE' as const,
+ isFreeTier: true,
+ usagePct: 0,
+ isNearLimit: false,
+ isAtLimit: false,
+ isBudgetExhausted: false,
+ shouldShowBudgetCompletedMessage: false,
+ isLoading: false,
+ refresh: vi.fn(),
+ })),
}));
vi.mock('../../services/chatService', () => ({
@@ -69,6 +82,10 @@ vi.mock('../../services/api/threadApi', () => ({
},
}));
+vi.mock('../../hooks/useUsageState', () => ({ useUsageState: mockUseUsageState }));
+
+vi.mock('../../components/chat/ChatNewWindowHero', () => ({ default: () => null }));
+
vi.mock('../../lib/coreState/store', () => ({
getCoreStateSnapshot: vi.fn(() => ({
isBootstrapping: false,
diff --git a/app/src/pages/__tests__/Conversations.render.test.tsx b/app/src/pages/__tests__/Conversations.render.test.tsx
index 82a894366c..7c76674c8e 100644
--- a/app/src/pages/__tests__/Conversations.render.test.tsx
+++ b/app/src/pages/__tests__/Conversations.render.test.tsx
@@ -94,6 +94,10 @@ vi.mock('../../services/api/threadApi', () => ({
},
}));
+vi.mock('../../hooks/useUsageState', () => ({ useUsageState: mockUseUsageState }));
+
+vi.mock('../../components/chat/ChatNewWindowHero', () => ({ default: () => null }));
+
// coreState/store: getCoreStateSnapshot used by selectSocketStatus.
vi.mock('../../lib/coreState/store', () => ({
getCoreStateSnapshot: vi.fn(() => ({
@@ -830,7 +834,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {
threadId: thread.id,
message: 'hello cloud',
model: 'hint:chat',
- profileId: 'default',
locale: 'en',
});
});
@@ -854,7 +857,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {
threadId: thread.id,
message: 'play highway to hell',
model: 'hint:chat',
- profileId: 'default',
locale: 'en',
});
});
@@ -906,7 +908,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {
threadId: thread.id,
message: 'slow backend',
model: 'hint:chat',
- profileId: 'default',
locale: 'en',
});
// The send cleared the composer; with an empty composer mid-send the Send
@@ -1681,7 +1682,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {
threadId: thread.id,
message: 'enter send',
model: 'hint:chat',
- profileId: 'default',
locale: 'en',
});
});
@@ -1756,7 +1756,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {
threadId: thread.id,
message: '안녕',
model: 'hint:chat',
- profileId: 'default',
locale: 'en',
});
});