File tree Expand file tree Collapse file tree
apps/sim/tools/quickbooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -385,6 +385,29 @@ describe('QuickBooks report block behavior', () => {
385385 } )
386386 } )
387387
388+ it ( 'omits blank report filters serialized as null by the editor' , ( ) => {
389+ const params = QuickBooksBlock . tools . config ! . params ! ( {
390+ operation : 'quickbooks_run_financial_report' ,
391+ oauthCredential : 'credential-id' ,
392+ reportType : 'ap_aging_summary' ,
393+ reportEndDate : '2026-08-02' ,
394+ reportVendorId : null ,
395+ reportDepartmentId : null ,
396+ reportAgingMethod : 'report_date' ,
397+ reportAgingDays : '30' ,
398+ } )
399+
400+ expect ( params . vendorId ) . toBeUndefined ( )
401+ expect ( params . departmentId ) . toBeUndefined ( )
402+
403+ const url = buildQuickBooksReportUrl ( {
404+ ...authParams ,
405+ ...params ,
406+ } as QuickBooksRunFinancialReportParams )
407+ expect ( url . searchParams . has ( 'vendor' ) ) . toBe ( false )
408+ expect ( url . searchParams . has ( 'department' ) ) . toBe ( false )
409+ } )
410+
388411 it ( 'keeps support arrays consistent with the block conditions' , ( ) => {
389412 expect ( getQuickBooksReportTypesSupporting ( 'aging' ) ) . toEqual ( [
390413 'ap_aging_detail' ,
You can’t perform that action at this time.
0 commit comments