Skip to content

Commit 3136636

Browse files
committed
chore: move all Timeline tests to a single-gateway mode group
1 parent 794fc9e commit 3136636

File tree

3 files changed

+1056
-1029
lines changed

3 files changed

+1056
-1029
lines changed

packages/job-worker/src/__mocks__/context.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
IBlueprintSegment,
1313
ISegmentUserContext,
1414
IShowStyleContext,
15+
IStudioSettings,
1516
IngestSegment,
1617
PlaylistTimingType,
1718
ShowStyleBlueprintManifest,
@@ -60,7 +61,10 @@ import { processShowStyleBase, processShowStyleVariant } from '../jobs/showStyle
6061
import { defaultStudio } from './defaultCollectionObjects.js'
6162
import { convertStudioToJobStudio } from '../jobs/studio.js'
6263

63-
export function setupDefaultJobEnvironment(studioId?: StudioId): MockJobContext {
64+
export function setupDefaultJobEnvironment(
65+
studioId?: StudioId,
66+
studioSettings?: Partial<IStudioSettings>
67+
): MockJobContext {
6468
const { mockCollections, jobCollections } = getMockCollections()
6569

6670
// We don't bother 'saving' this to the db, as usually nothing will load it
@@ -71,6 +75,16 @@ export function setupDefaultJobEnvironment(studioId?: StudioId): MockJobContext
7175
blueprintId: protectString('studioBlueprint0'),
7276
}
7377

78+
if (studioSettings) {
79+
studio.settingsWithOverrides = {
80+
...studio.settingsWithOverrides,
81+
defaults: {
82+
...studio.settingsWithOverrides.defaults,
83+
...studioSettings,
84+
},
85+
}
86+
}
87+
7488
return new MockJobContext(jobCollections, mockCollections, studio)
7589
}
7690

packages/job-worker/src/playout/__tests__/__snapshots__/timeline.test.ts.snap

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Timeline Adlib pieces Current part with preroll 1`] = `
3+
exports[`Timeline Single-gateway mode Adlib pieces Current part with preroll 1`] = `
44
[
55
{
66
"_id": "mockStudio0",
@@ -17,7 +17,7 @@ exports[`Timeline Adlib pieces Current part with preroll 1`] = `
1717
]
1818
`;
1919

20-
exports[`Timeline Adlib pieces Current part with preroll and adlib preroll 1`] = `
20+
exports[`Timeline Single-gateway mode Adlib pieces Current part with preroll and adlib preroll 1`] = `
2121
[
2222
{
2323
"_id": "mockStudio0",
@@ -34,7 +34,7 @@ exports[`Timeline Adlib pieces Current part with preroll and adlib preroll 1`] =
3434
]
3535
`;
3636

37-
exports[`Timeline Basic rundown 1`] = `
37+
exports[`Timeline Single-gateway mode Basic rundown 1`] = `
3838
[
3939
{
4040
"_id": "mockStudio0",
@@ -51,7 +51,7 @@ exports[`Timeline Basic rundown 1`] = `
5151
]
5252
`;
5353

54-
exports[`Timeline Basic rundown 2`] = `
54+
exports[`Timeline Single-gateway mode Basic rundown 2`] = `
5555
[
5656
{
5757
"_id": "mockStudio0",
@@ -68,7 +68,7 @@ exports[`Timeline Basic rundown 2`] = `
6868
]
6969
`;
7070

71-
exports[`Timeline In transitions Basic inTransition 1`] = `
71+
exports[`Timeline Single-gateway mode In transitions Basic inTransition 1`] = `
7272
[
7373
{
7474
"_id": "mockStudio0",
@@ -85,7 +85,7 @@ exports[`Timeline In transitions Basic inTransition 1`] = `
8585
]
8686
`;
8787

88-
exports[`Timeline In transitions Basic inTransition with contentDelay + preroll 1`] = `
88+
exports[`Timeline Single-gateway mode In transitions Basic inTransition with contentDelay + preroll 1`] = `
8989
[
9090
{
9191
"_id": "mockStudio0",
@@ -102,7 +102,7 @@ exports[`Timeline In transitions Basic inTransition with contentDelay + preroll
102102
]
103103
`;
104104

105-
exports[`Timeline In transitions Basic inTransition with contentDelay 1`] = `
105+
exports[`Timeline Single-gateway mode In transitions Basic inTransition with contentDelay 1`] = `
106106
[
107107
{
108108
"_id": "mockStudio0",
@@ -119,7 +119,7 @@ exports[`Timeline In transitions Basic inTransition with contentDelay 1`] = `
119119
]
120120
`;
121121

122-
exports[`Timeline In transitions Basic inTransition with planned pieces 1`] = `
122+
exports[`Timeline Single-gateway mode In transitions Basic inTransition with planned pieces 1`] = `
123123
[
124124
{
125125
"_id": "mockStudio0",
@@ -136,7 +136,7 @@ exports[`Timeline In transitions Basic inTransition with planned pieces 1`] = `
136136
]
137137
`;
138138

139-
exports[`Timeline In transitions Preroll 1`] = `
139+
exports[`Timeline Single-gateway mode In transitions Preroll 1`] = `
140140
[
141141
{
142142
"_id": "mockStudio0",
@@ -153,7 +153,7 @@ exports[`Timeline In transitions Preroll 1`] = `
153153
]
154154
`;
155155

156-
exports[`Timeline In transitions inTransition disabled 1`] = `
156+
exports[`Timeline Single-gateway mode In transitions inTransition disabled 1`] = `
157157
[
158158
{
159159
"_id": "mockStudio0",
@@ -170,7 +170,7 @@ exports[`Timeline In transitions inTransition disabled 1`] = `
170170
]
171171
`;
172172

173-
exports[`Timeline In transitions inTransition is disabled during hold 1`] = `
173+
exports[`Timeline Single-gateway mode In transitions inTransition is disabled during hold 1`] = `
174174
[
175175
{
176176
"_id": "mockStudio0",
@@ -187,7 +187,7 @@ exports[`Timeline In transitions inTransition is disabled during hold 1`] = `
187187
]
188188
`;
189189

190-
exports[`Timeline In transitions inTransition with existing infinites 1`] = `
190+
exports[`Timeline Single-gateway mode In transitions inTransition with existing infinites 1`] = `
191191
[
192192
{
193193
"_id": "mockStudio0",
@@ -204,7 +204,7 @@ exports[`Timeline In transitions inTransition with existing infinites 1`] = `
204204
]
205205
`;
206206

207-
exports[`Timeline In transitions inTransition with new infinite 1`] = `
207+
exports[`Timeline Single-gateway mode In transitions inTransition with new infinite 1`] = `
208208
[
209209
{
210210
"_id": "mockStudio0",
@@ -221,7 +221,7 @@ exports[`Timeline In transitions inTransition with new infinite 1`] = `
221221
]
222222
`;
223223

224-
exports[`Timeline Infinite Pieces Infinite Piece has stable timing across timeline regenerations with/without plannedStartedPlayback 1`] = `
224+
exports[`Timeline Single-gateway mode Infinite Pieces Infinite Piece has stable timing across timeline regenerations with/without plannedStartedPlayback 1`] = `
225225
[
226226
{
227227
"_id": "mockStudio0",
@@ -238,7 +238,7 @@ exports[`Timeline Infinite Pieces Infinite Piece has stable timing across timeli
238238
]
239239
`;
240240

241-
exports[`Timeline Out transitions Basic outTransition 1`] = `
241+
exports[`Timeline Single-gateway mode Out transitions Basic outTransition 1`] = `
242242
[
243243
{
244244
"_id": "mockStudio0",
@@ -255,7 +255,7 @@ exports[`Timeline Out transitions Basic outTransition 1`] = `
255255
]
256256
`;
257257

258-
exports[`Timeline Out transitions outTransition + inTransition 1`] = `
258+
exports[`Timeline Single-gateway mode Out transitions outTransition + inTransition 1`] = `
259259
[
260260
{
261261
"_id": "mockStudio0",
@@ -272,7 +272,7 @@ exports[`Timeline Out transitions outTransition + inTransition 1`] = `
272272
]
273273
`;
274274

275-
exports[`Timeline Out transitions outTransition + preroll (2) 1`] = `
275+
exports[`Timeline Single-gateway mode Out transitions outTransition + preroll (2) 1`] = `
276276
[
277277
{
278278
"_id": "mockStudio0",
@@ -289,7 +289,7 @@ exports[`Timeline Out transitions outTransition + preroll (2) 1`] = `
289289
]
290290
`;
291291

292-
exports[`Timeline Out transitions outTransition + preroll 1`] = `
292+
exports[`Timeline Single-gateway mode Out transitions outTransition + preroll 1`] = `
293293
[
294294
{
295295
"_id": "mockStudio0",
@@ -306,7 +306,7 @@ exports[`Timeline Out transitions outTransition + preroll 1`] = `
306306
]
307307
`;
308308

309-
exports[`Timeline Out transitions outTransition is disabled during hold 1`] = `
309+
exports[`Timeline Single-gateway mode Out transitions outTransition is disabled during hold 1`] = `
310310
[
311311
{
312312
"_id": "mockStudio0",

0 commit comments

Comments
 (0)