The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test: update test snapshots for NoticeCenter and Conversations
Steven Enamakel5ac98e574a55
diff --git a/app/src/components/notices/__tests__/NoticeCenter.test.tsx b/app/src/components/notices/__tests__/NoticeCenter.test.tsxindex fe8d1f920f..e38998e580 100644--- a/app/src/components/notices/__tests__/NoticeCenter.test.tsx+++ b/app/src/components/notices/__tests__/NoticeCenter.test.tsx@@ -246,6 +246,25 @@ describe('NoticeCenter', () => {expect(screen.getByTestId('pathname')).toHaveTextContent('/connections?tab=skills');});+ it('raises the near-limit warning and persists its dismissal for 24h', async () => {+ usageState.teamUsage = { plan: 'free' };+ usageState.isNearLimit = true;+ usageState.isFreeTier = true;+ usageState.usagePct = 0.85;+ localStorage.removeItem('openhuman:upsell:conversations-warning');+ renderCenter([]);++ await userEvent.click(screen.getByTestId('notice-trigger'));+ expect(screen.getByText('Approaching usage limit')).toBeInTheDocument();++ await userEvent.click(screen.getByTestId('notice-dismiss'));++ // Persisted, not session-only: usage creeps up over days, so re-nagging on+ // every restart is exactly what the banner's 24h cooldown prevented.+ expect(localStorage.getItem('openhuman:upsell:conversations-warning')).not.toBeNull();+ expect(screen.queryByTestId('notice-center')).toBeNull();+ });+it('dismisses a classified error out of the list', async () => {renderCenter([memoryError]);diff --git a/app/src/pages/__tests__/Conversations.render.test.tsx b/app/src/pages/__tests__/Conversations.render.test.tsxindex 9cebce5a52..529ab85121 100644--- a/app/src/pages/__tests__/Conversations.render.test.tsx+++ b/app/src/pages/__tests__/Conversations.render.test.tsx@@ -855,73 +855,6 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {expect(screen.getByTestId('route-path')).toHaveTextContent('/chat');});- // Covers lines 1399, 1409-1410: isNearLimit UpsellBanner render + onCtaClick- it('renders near-limit UpsellBanner and clicking Upgrade calls openUrl', async () => {- const { openUrl } = await import('../../utils/openUrl');-- mockUseUsageState.mockReturnValue({- teamUsage: null,- currentPlan: null,- currentTier: 'FREE' as const,- isFreeTier: true,- usagePct: 0.85,- isNearLimit: true,- isAtLimit: false,- isBudgetExhausted: false,- shouldShowBudgetCompletedMessage: false,- isLoading: false,- refresh: vi.fn(),- });-- await act(async () => {- await renderConversations({ thread: emptyThreadState });- });-- // UpsellBanner renders with "Approaching usage limit" (line 1399 branch)- expect(screen.getByText('Approaching usage limit')).toBeInTheDocument();-- // Click the "Upgrade" button — covers line 1409-1410 (onCtaClick callback)- const upgradeBtn = screen.getByText('Upgrade');- await act(async () => {- fireEvent.click(upgradeBtn);- });-- expect(openUrl).toHaveBeenCalled();- });-- // Covers line 1413: onDismiss callback inside UpsellBanner- it('dismissing the near-limit UpsellBanner writes to localStorage (onDismiss executes)', async () => {- mockUseUsageState.mockReturnValue({- teamUsage: null,- currentPlan: null,- currentTier: 'FREE' as const,- isFreeTier: true,- usagePct: 0.9,- isNearLimit: true,- isAtLimit: false,- isBudgetExhausted: false,- shouldShowBudgetCompletedMessage: false,- isLoading: false,- refresh: vi.fn(),- });-- await act(async () => {- await renderConversations({ thread: emptyThreadState });- });-- // UpsellBanner renders- expect(screen.getByText('Approaching usage limit')).toBeInTheDocument();-- // Click dismiss button (aria-label="Dismiss") — covers line 1413 (onDismiss callback)- const dismissBtn = screen.getByRole('button', { name: 'Dismiss' });- await act(async () => {- fireEvent.click(dismissBtn);- });-- // dismissBanner writes to localStorage with the banner key — confirms line 1413 executed- expect(localStorage.getItem('openhuman:upsell:conversations-warning')).not.toBeNull();- });-// Covers line 1443: onClick inside "Top Up" button in budget-exceeded bannerit('clicking "Top Up" in the budget banner calls openUrl', async () => {const { openUrl } = await import('../../utils/openUrl');