@@ -813,6 +813,7 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
813813 const mockBeforeSpec = sinon . stub ( )
814814 const mockAccessStudioAI = sinon . stub ( ) . resolves ( true )
815815 const mockCaptureStudioEvent = sinon . stub ( ) . resolves ( )
816+ const mockUpdateSessionId = sinon . stub ( )
816817
817818 this . project . spec = { }
818819
@@ -832,6 +833,8 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
832833 dbPath : 'test-db-path' ,
833834 }
834835
836+ studioManager . updateSessionId = mockUpdateSessionId
837+
835838 const studioLifecycleManager = new StudioLifecycleManager ( )
836839
837840 this . project . ctx . coreData . studioLifecycleManager = studioLifecycleManager
@@ -878,6 +881,8 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
878881 name : 'chrome' ,
879882 } )
880883
884+ expect ( mockUpdateSessionId . getCall ( 0 ) . args [ 0 ] ) . to . be . a . uuid ( )
885+
881886 expect ( browsers . connectProtocolToBrowser ) . to . be . calledWith ( {
882887 browser : this . project . browser ,
883888 foundBrowsers : this . project . options . browsers ,
@@ -905,6 +910,7 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
905910 const mockBeforeSpec = sinon . stub ( )
906911 const mockAccessStudioAI = sinon . stub ( ) . resolves ( true )
907912 const mockCaptureStudioEvent = sinon . stub ( ) . resolves ( )
913+ const mockUpdateSessionId = sinon . stub ( )
908914
909915 this . project . spec = { }
910916
@@ -924,6 +930,8 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
924930 dbPath : 'test-db-path' ,
925931 }
926932
933+ studioManager . updateSessionId = mockUpdateSessionId
934+
927935 const studioLifecycleManager = new StudioLifecycleManager ( )
928936
929937 this . project . ctx . coreData . studioLifecycleManager = studioLifecycleManager
@@ -962,6 +970,7 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
962970 const { cloudStudioSessionId } = await studioInitPromise
963971
964972 expect ( cloudStudioSessionId ) . to . equal ( 'existing-session-id' )
973+ expect ( mockUpdateSessionId ) . to . be . calledOnceWith ( 'existing-session-id' )
965974 } )
966975
967976 it ( 'calls resetBrowserState during onStudioInit when AI is enabled' , async function ( ) {
0 commit comments