Skip to content

Commit ffa3ff2

Browse files
committed
fix(zoho-desk): configure real metadata for agent regressions
1 parent 619c3aa commit ffa3ff2

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

‎apps/sim/tools/zoho_desk/agent-input.test.ts‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
import { describe, expect, it } from 'vitest'
1+
import { afterEach, beforeEach, describe, expect, it, type MockInstance, vi } from 'vitest'
22
import { ZohoDeskBlock } from '@/blocks/blocks/zoho-desk'
33
import { prepareToolExecution, transformBlockTool } from '@/providers/utils'
4+
import * as toolMetadata from '@/tools/metadata'
45
import { getSubBlocksForToolInput } from '@/tools/params'
56
import { zohoDeskCreateTicketTool } from '@/tools/zoho_desk/create_ticket'
67
import { zohoDeskListTicketsTool } from '@/tools/zoho_desk/list_tickets'
78
import { zohoDeskSendReplyTool } from '@/tools/zoho_desk/send_reply'
89

10+
let metadataSpy: MockInstance<typeof toolMetadata.getToolMetadata>
11+
12+
beforeEach(() => {
13+
metadataSpy = vi
14+
.spyOn(toolMetadata, 'getToolMetadata')
15+
.mockImplementation((id) =>
16+
[zohoDeskCreateTicketTool, zohoDeskListTicketsTool, zohoDeskSendReplyTool].find(
17+
(tool) => tool.id === id
18+
)
19+
)
20+
})
21+
22+
afterEach(() => metadataSpy.mockRestore())
23+
924
const editorParams = (toolId: string, operation: string, values: Record<string, unknown>) => {
1025
const fields = getSubBlocksForToolInput(
1126
toolId,

0 commit comments

Comments
 (0)