@@ -259,7 +259,7 @@ describe('ContextSelectionWebviewMain', () => {
259259 callOrder . push ( 'loadSolution' ) ;
260260 return ETextFileResult . Success ;
261261 } ) ;
262- const sendContextDataSpy = jest . spyOn ( main as any , 'sendContextData ' ) . mockResolvedValue ( undefined ) ;
262+ const sendContextDataFromControllerStateSpy = jest . spyOn ( main as any , 'sendContextDataFromControllerState ' ) . mockResolvedValue ( undefined ) ;
263263
264264 const hasExternalFileChangesSpy = jest . spyOn ( main . controller , 'hasExternalFileChanges' ) . mockImplementation ( ( ) => {
265265 callOrder . push ( 'hasExternalFileChanges' ) ;
@@ -284,19 +284,19 @@ describe('ContextSelectionWebviewMain', () => {
284284 'loadSolution' ,
285285 'ensureActiveTargetTypeName' ,
286286 ] ) ;
287- expect ( sendContextDataSpy ) . toHaveBeenCalledTimes ( 1 ) ;
287+ expect ( sendContextDataFromControllerStateSpy ) . toHaveBeenCalledTimes ( 1 ) ;
288288 } ) ;
289289
290- it ( 'calls sendContextData when transitioning to active state' , async ( ) => {
290+ it ( 'calls sendContextDataFromControllerState when transitioning to active state' , async ( ) => {
291291 const solutionManager = solutionManagerFactory ( ) ;
292292 const main = manageSolutionWebviewMainFactory ( {
293293 solutionManager,
294294 webviewManager
295295 } ) ;
296296 ( main as any ) . webviewManager . isPanelActive = jest . fn ( ) . mockReturnValue ( true ) ; // Simulate active panel
297297
298- // Spy on sendContextData to verify it gets called
299- const sendContextDataSpy = jest . spyOn ( main as any , 'sendContextData ' ) . mockResolvedValue ( undefined ) ;
298+ // Spy on broadcast helper to verify it gets called
299+ const sendContextDataFromControllerStateSpy = jest . spyOn ( main as any , 'sendContextDataFromControllerState ' ) . mockResolvedValue ( undefined ) ;
300300
301301 await main . activate ( context as vscode . ExtensionContext ) ;
302302
@@ -307,19 +307,19 @@ describe('ContextSelectionWebviewMain', () => {
307307
308308 await waitTimeout ( ) ;
309309
310- expect ( sendContextDataSpy ) . toHaveBeenCalled ( ) ;
310+ expect ( sendContextDataFromControllerStateSpy ) . toHaveBeenCalled ( ) ;
311311 expect ( webviewManager . sendMessage ) . toHaveBeenCalledWith ( { type : 'IS_BUSY' , data : true } ) ;
312312 } ) ;
313313
314- it ( 'calls sendContextData when transitioning from idle to active' , async ( ) => {
314+ it ( 'calls sendContextDataFromControllerState when transitioning from idle to active' , async ( ) => {
315315 const solutionManager = solutionManagerFactory ( ) ;
316316 const main = manageSolutionWebviewMainFactory ( {
317317 solutionManager,
318318 webviewManager
319319 } ) ;
320320 ( main as any ) . webviewManager . isPanelActive = jest . fn ( ) . mockReturnValue ( true ) ; // Simulate active panel
321321
322- const sendContextDataSpy = jest . spyOn ( main as any , 'sendContextData ' ) . mockResolvedValue ( undefined ) ;
322+ const sendContextDataFromControllerStateSpy = jest . spyOn ( main as any , 'sendContextDataFromControllerState ' ) . mockResolvedValue ( undefined ) ;
323323
324324 await main . activate ( context as vscode . ExtensionContext ) ;
325325
@@ -333,7 +333,7 @@ describe('ContextSelectionWebviewMain', () => {
333333
334334 await waitTimeout ( ) ;
335335
336- expect ( sendContextDataSpy ) . toHaveBeenCalled ( ) ;
336+ expect ( sendContextDataFromControllerStateSpy ) . toHaveBeenCalled ( ) ;
337337 } ) ;
338338
339339 it ( 'does call sendContextData when transitioning from active to idle' , async ( ) => {
0 commit comments