Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/sim/tools/confluence/create_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const confluenceCreatePageTool: InternalToolConfig<
* picks the space's homepage); its id is a placeholder.
*/
dryRunOutput: (params) => {
const spaceId = params.spaceId.trim()
const spaceId = String(params.spaceId).trim()
return {
pageId: dryRunId('page'),
title: params.title,
Expand Down
12 changes: 12 additions & 0 deletions apps/sim/tools/dry-run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ describe('a dry run’s placeholder for an unsent write', () => {
expect(returned).toMatchObject({ data: { chat: { id: -1001234 } } })
})

it('echoes a Confluence space named by a numeric id given as a number', async () => {
const returned = await placeholderFor('confluence_create_page', {
accessToken: SECRET,
domain: 'acme.atlassian.net',
spaceId: 12345,
title: 'Notes',
content: '<p>x</p>',
})

expect(returned.spaceId).toBe('12345')
})

it('samples a file list a placeholder cannot hold as empty', async () => {
const returned = await placeholderFor('slack_message', {
accessToken: SECRET,
Expand Down
Loading