@@ -813,6 +813,7 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
813
813
const mockBeforeSpec = sinon . stub ( )
814
814
const mockAccessStudioAI = sinon . stub ( ) . resolves ( true )
815
815
const mockCaptureStudioEvent = sinon . stub ( ) . resolves ( )
816
+ const mockUpdateSessionId = sinon . stub ( )
816
817
817
818
this . project . spec = { }
818
819
@@ -832,6 +833,8 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
832
833
dbPath : 'test-db-path' ,
833
834
}
834
835
836
+ studioManager . updateSessionId = mockUpdateSessionId
837
+
835
838
const studioLifecycleManager = new StudioLifecycleManager ( )
836
839
837
840
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
878
881
name : 'chrome' ,
879
882
} )
880
883
884
+ expect ( mockUpdateSessionId . getCall ( 0 ) . args [ 0 ] ) . to . be . a . uuid ( )
885
+
881
886
expect ( browsers . connectProtocolToBrowser ) . to . be . calledWith ( {
882
887
browser : this . project . browser ,
883
888
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
905
910
const mockBeforeSpec = sinon . stub ( )
906
911
const mockAccessStudioAI = sinon . stub ( ) . resolves ( true )
907
912
const mockCaptureStudioEvent = sinon . stub ( ) . resolves ( )
913
+ const mockUpdateSessionId = sinon . stub ( )
908
914
909
915
this . project . spec = { }
910
916
@@ -924,6 +930,8 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
924
930
dbPath : 'test-db-path' ,
925
931
}
926
932
933
+ studioManager . updateSessionId = mockUpdateSessionId
934
+
927
935
const studioLifecycleManager = new StudioLifecycleManager ( )
928
936
929
937
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
962
970
const { cloudStudioSessionId } = await studioInitPromise
963
971
964
972
expect ( cloudStudioSessionId ) . to . equal ( 'existing-session-id' )
973
+ expect ( mockUpdateSessionId ) . to . be . calledOnceWith ( 'existing-session-id' )
965
974
} )
966
975
967
976
it ( 'calls resetBrowserState during onStudioInit when AI is enabled' , async function ( ) {
0 commit comments