Skip to content

🎥 Make videos programmatically with React

fix(studio): fix timeline tree layout test types for build

Jonny Burgerb48d134fb8e1
diff --git a/packages/studio/src/test/timeline-tree-layout.test.ts b/packages/studio/src/test/timeline-tree-layout.test.ts
index 9a9f9acfe7..d83fffa680 100644
--- a/packages/studio/src/test/timeline-tree-layout.test.ts
+++ b/packages/studio/src/test/timeline-tree-layout.test.ts
@@ -1,5 +1,9 @@
import {expect, test} from 'bun:test';
-import type {TSequence} from 'remotion';
+import type {
+ SequenceNodePath,
+ SequencePropsSubscriptionKey,
+ TSequence,
+} from 'remotion';
import {
getExpandedRowDepth,
getTimelineRowPaddingLeft,
@@ -10,11 +14,17 @@ import {
flattenVisibleTreeNodes,
} from '../helpers/timeline-layout';
+const makeSubscriptionKey = (
+ nodePath: SequenceNodePath,
+): SequencePropsSubscriptionKey => ({
+ absolutePath: '/project/src/Comp.tsx',
+ nodePath,
+ sequenceKeys: ['from', 'durationInFrames'],
+ effectKeys: [],
+});
+
const nodePathInfo: SequenceNodePathInfo = {
- sequenceSubscriptionKey: {
- nodePath: ['Composition', 'Sequence'],
- overrideId: 'test',
- },
+ sequenceSubscriptionKey: makeSubscriptionKey(['Composition', 'Sequence']),
auxiliaryKeys: [],
index: 0,
numberOfSequencesWithThisNodePath: 1,
@@ -33,12 +43,14 @@ const makeSequence = (): TSequence => ({
getStack: () => null,
premountDisplay: null,
postmountDisplay: null,
+ loopDisplay: undefined,
controls: {
overrideId: 'test',
schema: {
translate: {
type: 'translate',
description: 'Translate',
+ default: '0px 0px',
},
},
currentRuntimeValueDotNotation: {},
@@ -50,10 +62,11 @@ const makeSequence = (): TSequence => ({
color: {
type: 'color',
description: 'Color',
+ default: '#ffffff',
},
},
},
- ],
+ ] as unknown as TSequence['effects'],
});
test('effect field auxiliaryKeys include effect path', () => {