Skip to content

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

fix(settings): correct AI panel test to use proper mock structure

Steven Enamakelbd23f73247cf
diff --git a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx b/app/src/components/settings/panels/__tests__/AIPanel.test.tsx
index f846a2a625..84997b7c71 100644
--- a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/AIPanel.test.tsx
@@ -235,7 +235,7 @@ const baseTransactions = [
{
id: 'latest',
type: 'SPEND' as const,
- action: 'HEARTBEAT',
+ action: 'MEMORY_SUMMARY',
amountUsd: -0.5,
balanceAfterUsd: 9.25,
createdAt: '2026-05-17T03:00:00.000Z',
@@ -379,9 +379,7 @@ describe('AIPanel', () => {
'Coding',
'Vision',
'Memory summarization',
- 'Heartbeat',
/Learning/,
- 'Subconscious',
]) {
expect(screen.getByText(label)).toBeInTheDocument();
}
@@ -2210,7 +2208,7 @@ describe('AIPanel', () => {
expect(screen.getByText('Composio sync scans')).toBeInTheDocument();
expect(screen.getByText('Memory worker polls')).toBeInTheDocument();
- expect(screen.getByText('HEARTBEAT')).toBeInTheDocument();
+ expect(screen.getByText('MEMORY_SUMMARY')).toBeInTheDocument();
expect(screen.getByText('SPEND:USAGE_DEDUCTION:USER')).toBeInTheDocument();
expect(screen.getByText(/Latest spend: \$0\.5000/)).toBeInTheDocument();
});
diff --git a/app/src/hooks/useUsageState.test.ts b/app/src/hooks/useUsageState.test.ts
index 67cd16c391..ae54606e4f 100644
--- a/app/src/hooks/useUsageState.test.ts
+++ b/app/src/hooks/useUsageState.test.ts
@@ -616,7 +616,7 @@ describe('useUsageState', () => {
});
it('suppresses near-limit banner when chat is fully routed away but background workloads remain (#3097)', async () => {
- // Background workloads (memory, heartbeat, …) keep the billing API call
+ // Background workloads (memory, learning, …) keep the billing API call
// alive (ALL_WORKLOADS check), but isFullyRoutedAway (CHAT_WORKLOADS) is
// true so the near-limit banner must NOT show — the user's chat is not
// on OpenHuman's budget.