33 DefaultEnvironment ,
44 setupDefaultRundownPlaylist ,
55 convertToUIShowStyleBase ,
6+ convertToUIStudio ,
67} from '../../../__mocks__/helpers/database.js'
78import { RundownUtils } from '../rundown.js'
89import { Piece } from '@sofie-automation/corelib/dist/dataModel/Piece'
@@ -16,6 +17,7 @@ import { PartInstances, PieceInstances, Pieces, RundownPlaylists } from '../../c
1617import { MongoMock } from '../../../__mocks__/mongo.js'
1718import { RundownPlaylistCollectionUtil } from '../../collections/rundownPlaylistUtil.js'
1819import { RundownPlaylistClientUtil } from '../rundownPlaylistUtil.js'
20+ import { UIStudio } from '@sofie-automation/meteor-lib/dist/api/studios'
1921
2022const mockRundownPlaylistsCollection = MongoMock . getInnerMockCollection ( RundownPlaylists )
2123const mockPartInstancesCollection = MongoMock . getInnerMockCollection ( PartInstances )
@@ -36,9 +38,11 @@ jest.mock('../../ui/Collections', () => {
3638describe ( 'client/lib/rundown' , ( ) => {
3739 let env : DefaultEnvironment
3840 let playlistId : RundownPlaylistId
41+ let studio : UIStudio
3942 beforeEach ( async ( ) => {
4043 env = await setupDefaultStudioEnvironment ( )
4144 playlistId = ( await setupDefaultRundownPlaylist ( env ) ) . playlistId
45+ studio = convertToUIStudio ( env . studio )
4246 } )
4347 describe ( 'RundownUtils.getResolvedSegment' , ( ) => {
4448 test ( 'Basic Segment resolution' , ( ) => {
@@ -56,6 +60,7 @@ describe('client/lib/rundown', () => {
5660
5761 const resolvedSegment = RundownUtils . getResolvedSegment (
5862 showStyleBase ,
63+ studio ,
5964 playlist ,
6065 rundown ,
6166 segment ,
@@ -117,6 +122,7 @@ describe('client/lib/rundown', () => {
117122
118123 const resolvedSegment = RundownUtils . getResolvedSegment (
119124 showStyleBase ,
125+ studio ,
120126 playlist ,
121127 rundown ,
122128 segment ,
@@ -202,6 +208,7 @@ describe('client/lib/rundown', () => {
202208
203209 const resolvedSegment = RundownUtils . getResolvedSegment (
204210 showStyleBase ,
211+ studio ,
205212 playlist ,
206213 rundown ,
207214 segment ,
@@ -352,6 +359,7 @@ describe('client/lib/rundown', () => {
352359
353360 const resolvedSegment = RundownUtils . getResolvedSegment (
354361 showStyleBase ,
362+ studio ,
355363 playlist ,
356364 rundown ,
357365 segment ,
0 commit comments