@@ -602,16 +602,14 @@ describe('ComponentsPacksWebviewMain', () => {
602602 expect ( stateMessages ) . toEqual (
603603 expect . arrayContaining ( [
604604 'Connecting to rpc daemon' ,
605- 'Loading Packs...' ,
606605 'Loading Solution...' ,
607606 'Retrieving assigned items...'
608607 ] )
609608 ) ;
610- expect ( stateMessages . indexOf ( 'Connecting to rpc daemon' ) ) . toBeLessThan ( stateMessages . indexOf ( 'Loading Packs ...' ) ) ;
611- expect ( stateMessages . indexOf ( 'Loading Packs ...' ) ) . toBeLessThan ( stateMessages . indexOf ( 'Loading Solution ...' ) ) ;
609+ expect ( stateMessages . indexOf ( 'Connecting to rpc daemon' ) ) . toBeLessThan ( stateMessages . indexOf ( 'Loading Solution ...' ) ) ;
610+ expect ( stateMessages . indexOf ( 'Loading Solution ...' ) ) . toBeLessThan ( stateMessages . indexOf ( 'Retrieving assigned items ...' ) ) ;
612611
613- expect ( svc . getVersion ) . toHaveBeenCalled ( ) ;
614- expect ( svc . loadPacks ) . toHaveBeenCalled ( ) ;
612+ expect ( svc . loadPacks ) . not . toHaveBeenCalled ( ) ;
615613 expect ( svc . loadSolution ) . toHaveBeenCalledWith ( { solution : 'solPath' , activeTarget : 'activeTs' } ) ;
616614 expect ( svc . getUsedItems ) . toHaveBeenCalledWith ( { context : 'activeCtx' } ) ;
617615 expect ( svc . getPacksInfo ) . toHaveBeenCalledWith ( { context : 'activeCtx' , all : false } ) ;
@@ -634,7 +632,6 @@ describe('ComponentsPacksWebviewMain', () => {
634632 await ( componentsPacksWebviewMain as any ) . loadSolution ( 'solPath' , 'activeTs' , 'activeCtx' , false ) ;
635633
636634 // Heavy operations not called
637- expect ( svc . getVersion ) . not . toHaveBeenCalled ( ) ;
638635 expect ( svc . loadPacks ) . not . toHaveBeenCalled ( ) ;
639636 expect ( svc . loadSolution ) . not . toHaveBeenCalled ( ) ;
640637
@@ -652,7 +649,7 @@ describe('ComponentsPacksWebviewMain', () => {
652649
653650 it ( 'handles errors and sends error messages' , async ( ) => {
654651 const error = new Error ( 'Boom failure' ) ;
655- const svc = setupCsolutionServiceMocks ( {
652+ setupCsolutionServiceMocks ( {
656653 getComponentsTree : jest . fn ( ) . mockRejectedValue ( error ) ,
657654 getLogMessages : jest . fn ( ) . mockResolvedValue ( {
658655 errors : [ 'E1' ] ,
@@ -677,9 +674,6 @@ describe('ComponentsPacksWebviewMain', () => {
677674
678675 // Ensure dirty flag cleared
679676 expect ( calls . some ( m => m . type === 'IS_DIRTY' && m . isDirty === false ) ) . toBe ( true ) ;
680-
681- // Heavy reload start still attempted before failure
682- expect ( svc . getVersion ) . toHaveBeenCalled ( ) ;
683677 } ) ;
684678 } ) ;
685679
0 commit comments