@@ -113,6 +113,7 @@ describe('viewCollection', () => {
113113 replay_stats : undefined ,
114114 configuration : {
115115 start_session_replay_recording_manually : jasmine . any ( Boolean ) ,
116+ remote_configuration_id : undefined ,
116117 } ,
117118 cls : undefined ,
118119 } ,
@@ -240,6 +241,28 @@ describe('viewCollection', () => {
240241 } )
241242 } )
242243
244+ describe ( 'with configuration.remote_configuration_id' , ( ) => {
245+ it ( 'should include the remote configuration id when configured' , ( ) => {
246+ setupViewCollection ( { remoteConfigurationId : 'foo' } )
247+ lifeCycle . notify ( LifeCycleEventType . VIEW_UPDATED , VIEW )
248+
249+ expect (
250+ ( rawRumEvents [ rawRumEvents . length - 1 ] . rawRumEvent as RawRumViewEvent ) . _dd . configuration
251+ . remote_configuration_id
252+ ) . toBe ( 'foo' )
253+ } )
254+
255+ it ( 'should be undefined when remote configuration is not used' , ( ) => {
256+ setupViewCollection ( { remoteConfigurationId : undefined } )
257+ lifeCycle . notify ( LifeCycleEventType . VIEW_UPDATED , VIEW )
258+
259+ expect (
260+ ( rawRumEvents [ rawRumEvents . length - 1 ] . rawRumEvent as RawRumViewEvent ) . _dd . configuration
261+ . remote_configuration_id
262+ ) . toBeUndefined ( )
263+ } )
264+ } )
265+
243266 describe ( 'assembly hook' , ( ) => {
244267 it ( 'should add view properties from the history' , ( ) => {
245268 setupViewCollection ( { trackViewsManually : true } , VIEW )
0 commit comments