Skip to content

Commit d1b9c58

Browse files
fix(credential-groups): update managed MCP test fixtures
1 parent 2fe9da0 commit d1b9c58

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/settings/[section]/prefetch.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('credential-groups prefetch', () => {
7878
name: 'Engineering',
7979
description: null,
8080
options: [],
81+
mcpServers: [],
8182
status: 'active',
8283
createdAt: '2026-01-01T00:00:00.000Z',
8384
updatedAt: '2026-01-01T00:00:00.000Z',

apps/sim/hooks/mcp/use-mcp-oauth-popup.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ vi.mock('@/hooks/queries/mcp', () => ({
1717
useStartMcpOauth: () => ({ mutateAsync: mockStartOauth }),
1818
mcpKeys: {
1919
serversList: (workspaceId: string) => ['mcp', 'servers', workspaceId],
20+
managedCatalogList: (workspaceId: string) => ['mcp', 'managed-catalog', workspaceId],
2021
serverToolsList: (workspaceId: string, serverId: string) => [
2122
'mcp',
2223
'server-tools',

apps/sim/lib/credentials/application/service-account.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ vi.mock('@/lib/credentials/queries', () => ({
3939
}))
4040
vi.mock('@/lib/credentials/access', () => ({
4141
getCredentialActorContext: mocks.getActor,
42+
requireOrdinaryCredentialType: (type: string) => {
43+
if (type === 'managed_oauth' || type === 'managed_mcp') {
44+
throw new Error('Managed credential reached an ordinary credential surface')
45+
}
46+
return type
47+
},
4248
}))
4349
vi.mock('@/lib/posthog/server', () => ({ captureServerEvent: mocks.capture }))
4450

0 commit comments

Comments
 (0)