Skip to content

Commit 4cc85da

Browse files
committed
test: align Plan composer and desktop fixtures with staging
1 parent eb3ba6e commit 4cc85da

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎apps/sim/app/o/[organizationId]/home/components/composer/composer.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,12 @@ it('preserves mode-specific models and unsent effort across composer remounts',
491491
useMothershipPlanEffortStore.getState().setModel('gpt-6-sol')
492492
useMothershipEffortStore.getState().setNewChatEffort('xhigh')
493493
})
494-
expect(container.textContent).toContain('GPT-6 Sol')
494+
expect(container.textContent).toContain('GPT-6.1 Sol')
495495
expect(container.textContent).toContain('Extra High')
496496
await render(false, '', 'agent')
497497
expect(container.textContent).toContain('GPT-6 Astra')
498498
expect(container.textContent).toContain('Extra High')
499499
await render(false, '', 'plan')
500-
expect(container.textContent).toContain('GPT-6 Sol')
500+
expect(container.textContent).toContain('GPT-6.1 Sol')
501501
expect(container.textContent).toContain('Extra High')
502502
})

‎apps/sim/app/workspace/[workspaceId]/settings/components/desktop/desktop.test.tsx‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { act, type ReactNode } from 'react'
55
import { emcnMock } from '@sim/testing/mocks/emcn.mock'
66
import { libDesktopMock, libDesktopMockFns } from '@sim/testing/mocks/lib-desktop.mock'
77
import { nextNavigationMock } from '@sim/testing/mocks/next-navigation.mock'
8+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
89
import { createRoot, type Root } from 'react-dom/client'
910
import { afterEach, describe, expect, it, vi } from 'vitest'
1011

@@ -56,7 +57,16 @@ async function render(device: { deviceId: string } | null) {
5657
const container = document.createElement('div')
5758
document.body.appendChild(container)
5859
root = createRoot(container)
59-
await act(async () => root?.render(<Desktop />))
60+
const queryClient = new QueryClient({
61+
defaultOptions: { queries: { retry: false, gcTime: 0 } },
62+
})
63+
await act(async () =>
64+
root?.render(
65+
<QueryClientProvider client={queryClient}>
66+
<Desktop />
67+
</QueryClientProvider>
68+
)
69+
)
6070
return container
6171
}
6272

0 commit comments

Comments
 (0)