File tree Expand file tree Collapse file tree
apps/sim/lib/slack-search Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,8 +372,21 @@ describe('Slack tool progress', () => {
372372 output : { accountLabel : 'private account' } ,
373373 } ,
374374 } )
375+ await stream . onEvent ( toolCall ( 'search_workspace' , 'tool-2' ) )
376+ await stream . onEvent ( toolResult ( 'search_workspace' , 'tool-2' ) )
377+ await stream . onEvent ( { type : 'text' , payload : { channel : 'assistant' , text : 'Answer.' } } )
378+ await stream . finish ( result )
375379 const chunks = deliveredChunks ( )
376- expect ( chunks [ 1 ] ) . toEqual ( { ...chunks [ 0 ] , status : 'complete' } )
380+ const tasks = chunks . filter ( ( chunk ) => chunk . type === 'task_update' )
381+ expect ( tasks . map ( ( chunk ) => chunk . status ) ) . toEqual ( [
382+ 'in_progress' ,
383+ 'complete' ,
384+ 'in_progress' ,
385+ 'complete' ,
386+ ] )
387+ expect ( deliveredText ( ) ) . toBe ( 'Answer.' )
388+ expect ( api . stop . mock . calls [ 0 ] [ 5 ] ) . toEqual ( [ ] )
389+ expect ( api . stop . mock . calls [ 0 ] [ 6 ] ) . toEqual ( [ ] )
377390 expect ( JSON . stringify ( chunks ) ) . not . toContain ( 'private' )
378391 } )
379392
You can’t perform that action at this time.
0 commit comments