Skip to content

Commit 2b6202c

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): keep shared line example valid
1 parent 188c36d commit 2b6202c

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

apps/sim/blocks/blocks/quickbooks.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,7 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
743743
title: 'Expense Lines (JSON)',
744744
type: 'code',
745745
language: 'json',
746-
placeholder:
747-
'[{"lineType":"account","amount":100,"accountId":"7","description":"Supplies","purchaseOrderId":"123","purchaseOrderLineId":"1"}]',
746+
placeholder: '[{"lineType":"account","amount":100,"accountId":"7","description":"Supplies"}]',
748747
condition: {
749748
field: 'operation',
750749
value: [

apps/sim/tools/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/quickbooks/purchasing.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,16 @@ describe('QuickBooks purchasing mutation bodies', () => {
672672
})
673673

674674
describe('QuickBooks purchasing block', () => {
675+
it('keeps the shared purchasing-lines example valid for every supported operation', () => {
676+
const subBlock = QuickBooksBlock.subBlocks.find(
677+
(candidate) => candidate.id === 'purchasingLines'
678+
)
679+
680+
expect(subBlock?.placeholder).not.toContain('purchaseOrderId')
681+
expect(subBlock?.placeholder).not.toContain('purchaseOrderLineId')
682+
expect(subBlock?.wandConfig?.prompt).toContain('For Create Bill only')
683+
})
684+
675685
it('does not force array-valued wand prompts through JSON-object generation', () => {
676686
for (const id of ['purchasingLines', 'billAllocations']) {
677687
const subBlock = QuickBooksBlock.subBlocks.find((candidate) => candidate.id === id)

0 commit comments

Comments
 (0)