@@ -412,7 +412,7 @@ describe('test peripheralDevice general API methods', () => {
412412 expect ( QueueStudioJobSpy ) . toHaveBeenNthCalledWith (
413413 1 ,
414414 StudioJobs . OnPlayoutPlaybackChanged ,
415- device . studioId ,
415+ device . studioAndConfigId ! . studioId ,
416416 literal < Parameters < StudioJobFunc [ StudioJobs . OnPlayoutPlaybackChanged ] > [ 0 ] > ( {
417417 playlistId : rundownPlaylistID ,
418418 changes : [
@@ -474,7 +474,7 @@ describe('test peripheralDevice general API methods', () => {
474474 expect ( QueueStudioJobSpy ) . toHaveBeenNthCalledWith (
475475 1 ,
476476 StudioJobs . OnTimelineTriggerTime ,
477- device . studioId ,
477+ device . studioAndConfigId ! . studioId ,
478478 literal < OnTimelineTriggerTimeProps > ( {
479479 results : timelineTriggerTimeResult ,
480480 } )
@@ -643,7 +643,10 @@ describe('test peripheralDevice general API methods', () => {
643643 organizationId : null ,
644644 name : 'Mock Media Manager' ,
645645 deviceName : 'Media Manager' ,
646- studioId : env . studio . _id ,
646+ studioAndConfigId : {
647+ studioId : env . studio . _id ,
648+ configId : 'test' ,
649+ } ,
647650 category : PeripheralDeviceCategory . MEDIA_MANAGER ,
648651 configManifest : {
649652 deviceConfigSchema : JSONBlobStringify ( { } ) ,
@@ -669,7 +672,7 @@ describe('test peripheralDevice general API methods', () => {
669672 deviceId : device . _id ,
670673 priority : 1 ,
671674 source : 'MockSource' ,
672- studioId : device . studioId ! ,
675+ studioId : device . studioAndConfigId ! . studioId ,
673676 finished : false ,
674677 success : false ,
675678 } )
@@ -681,7 +684,7 @@ describe('test peripheralDevice general API methods', () => {
681684 deviceId : device . _id ,
682685 priority : 2 ,
683686 status : MediaManagerAPI . WorkStepStatus . IDLE ,
684- studioId : device . studioId ! ,
687+ studioId : device . studioAndConfigId ! . studioId ,
685688 workFlowId : workFlowId ,
686689 } )
687690 await MediaWorkFlowSteps . insertAsync ( {
@@ -692,14 +695,14 @@ describe('test peripheralDevice general API methods', () => {
692695 deviceId : device . _id ,
693696 priority : 1 ,
694697 status : MediaManagerAPI . WorkStepStatus . IDLE ,
695- studioId : device . studioId ! ,
698+ studioId : device . studioAndConfigId ! . studioId ,
696699 workFlowId : workFlowId ,
697700 } )
698701 } )
699702 test ( 'getMediaWorkFlowRevisions' , async ( ) => {
700703 const workFlows = (
701704 await MediaWorkFlows . findFetchAsync ( {
702- studioId : device . studioId ,
705+ studioId : device . studioAndConfigId ! . studioId ,
703706 } )
704707 ) . map ( ( wf ) => ( {
705708 _id : wf . _id ,
@@ -713,7 +716,7 @@ describe('test peripheralDevice general API methods', () => {
713716 test ( 'getMediaWorkFlowStepRevisions' , async ( ) => {
714717 const workFlowSteps = (
715718 await MediaWorkFlowSteps . findFetchAsync ( {
716- studioId : device . studioId ,
719+ studioId : device . studioAndConfigId ! . studioId ,
717720 } )
718721 ) . map ( ( wf ) => ( {
719722 _id : wf . _id ,
@@ -798,7 +801,10 @@ describe('test peripheralDevice general API methods', () => {
798801 organizationId : null ,
799802 name : 'Mock Media Manager' ,
800803 deviceName : 'Media Manager' ,
801- studioId : env . studio . _id ,
804+ studioAndConfigId : {
805+ studioId : env . studio . _id ,
806+ configId : 'test' ,
807+ } ,
802808 category : PeripheralDeviceCategory . MEDIA_MANAGER ,
803809 configManifest : {
804810 deviceConfigSchema : JSONBlobStringify ( { } ) ,
@@ -832,7 +838,7 @@ describe('test peripheralDevice general API methods', () => {
832838 mediaSize : 10 ,
833839 mediaTime : 0 ,
834840 objId : MOCK_OBJID ,
835- studioId : device . studioId ! ,
841+ studioId : device . studioAndConfigId ! . studioId ,
836842 thumbSize : 0 ,
837843 thumbTime : 0 ,
838844 tinf : '' ,
@@ -841,7 +847,7 @@ describe('test peripheralDevice general API methods', () => {
841847 test ( 'getMediaObjectRevisions' , async ( ) => {
842848 const mobjects = (
843849 await MediaObjects . findFetchAsync ( {
844- studioId : device . studioId ,
850+ studioId : device . studioAndConfigId ! . studioId ,
845851 } )
846852 ) . map ( ( mo ) => ( {
847853 _id : mo . _id ,
@@ -862,7 +868,7 @@ describe('test peripheralDevice general API methods', () => {
862868 test ( 'update' , async ( ) => {
863869 const mo = ( await MediaObjects . findOneAsync ( {
864870 collectionId : MOCK_COLLECTION ,
865- studioId : device . studioId ! ,
871+ studioId : device . studioAndConfigId ! . studioId ,
866872 } ) ) as MediaObject
867873 expect ( mo ) . toBeTruthy ( )
868874
@@ -880,14 +886,14 @@ describe('test peripheralDevice general API methods', () => {
880886
881887 const updateMo = await MediaObjects . findOneAsync ( {
882888 collectionId : MOCK_COLLECTION ,
883- studioId : device . studioId ! ,
889+ studioId : device . studioAndConfigId ! . studioId ,
884890 } )
885891 expect ( updateMo ) . toMatchObject ( newMo )
886892 } )
887893 test ( 'remove' , async ( ) => {
888894 const mo = ( await MediaObjects . findOneAsync ( {
889895 collectionId : MOCK_COLLECTION ,
890- studioId : device . studioId ! ,
896+ studioId : device . studioAndConfigId ! . studioId ,
891897 } ) ) as MediaObject
892898 expect ( mo ) . toBeTruthy ( )
893899
@@ -901,7 +907,7 @@ describe('test peripheralDevice general API methods', () => {
901907
902908 const updateMo = await MediaObjects . findOneAsync ( {
903909 collectionId : MOCK_COLLECTION ,
904- studioId : device . studioId ! ,
910+ studioId : device . studioAndConfigId ! . studioId ,
905911 } )
906912 expect ( updateMo ) . toBeFalsy ( )
907913 } )
0 commit comments