@@ -128,15 +128,13 @@ describe('Oracle NetSuite block', () => {
128128 } )
129129 }
130130 expect ( getSubBlock ( 'statusTaskId' ) ) . toMatchObject ( {
131- canonicalParamId : 'taskId' ,
132131 required : {
133132 field : 'operation' ,
134133 value : 'netsuite_get_async_status' ,
135134 and : { field : 'view' , value : 'task' } ,
136135 } ,
137136 } )
138137 expect ( getSubBlock ( 'resultTaskId' ) ) . toMatchObject ( {
139- canonicalParamId : 'taskId' ,
140138 required : {
141139 field : 'operation' ,
142140 value : 'netsuite_get_async_result' ,
@@ -214,6 +212,9 @@ describe('Oracle NetSuite block', () => {
214212 expect (
215213 mapParams ( { operation : 'netsuite_get_async_status' , statusTaskId : 'task-7' } )
216214 ) . toMatchObject ( { taskId : 'task-7' } )
215+ expect (
216+ mapParams ( { operation : 'netsuite_get_async_result' , resultTaskId : 'task-8' } )
217+ ) . toMatchObject ( { taskId : 'task-8' } )
217218 expect (
218219 mapParams ( {
219220 operation : 'netsuite_attach_record' ,
@@ -253,7 +254,8 @@ describe('Oracle NetSuite block', () => {
253254 'datasetId' ,
254255 'jobId' ,
255256 'view' ,
256- 'taskId' ,
257+ 'statusTaskId' ,
258+ 'resultTaskId' ,
257259 'limit' ,
258260 'offset' ,
259261 'expand' ,
@@ -287,14 +289,10 @@ describe('Oracle NetSuite block', () => {
287289 ] ,
288290 } )
289291 for ( const input of expectedInputs ) {
290- if ( input !== 'operation' && input !== 'taskId' )
291- expect ( getSubBlock ( input ) , input ) . toBeDefined ( )
292+ if ( input !== 'operation' ) expect ( getSubBlock ( input ) , input ) . toBeDefined ( )
292293 }
293- expect (
294- NetSuiteBlock . subBlocks
295- . filter ( ( subBlock ) => subBlock . canonicalParamId === 'taskId' )
296- . map ( ( subBlock ) => subBlock . id )
297- ) . toEqual ( [ 'statusTaskId' , 'resultTaskId' ] )
294+ expect ( getSubBlock ( 'statusTaskId' ) ) . not . toHaveProperty ( 'canonicalParamId' )
295+ expect ( getSubBlock ( 'resultTaskId' ) ) . not . toHaveProperty ( 'canonicalParamId' )
298296 expect ( getSubBlock ( 'view' ) ) . toMatchObject ( {
299297 type : 'dropdown' ,
300298 condition : { field : 'operation' , value : 'netsuite_get_async_status' } ,
0 commit comments