Skip to content

Commit 0cc012c

Browse files
committed
fix: update tests for double-pause seek and formatted insertion
1 parent 2483ab5 commit 0cc012c

3 files changed

Lines changed: 24 additions & 6 deletions

File tree

packages/studio/src/components/sidebar/BlocksTab.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,16 @@ function BlockCard({
367367
const prompt = buildAgentPrompt(title, name, description, category, blockType, context);
368368
onShowPrompt?.({ title, prompt });
369369
},
370-
[title, name, description, category, blockType, activeCompPath, compositionDimensions, onShowPrompt],
370+
[
371+
title,
372+
name,
373+
description,
374+
category,
375+
blockType,
376+
activeCompPath,
377+
compositionDimensions,
378+
onShowPrompt,
379+
],
371380
);
372381

373382
return (
@@ -524,7 +533,15 @@ function PromptPreviewModal({
524533
className="p-1 rounded-md text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800/50"
525534
onClick={onClose}
526535
>
527-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round">
536+
<svg
537+
width="14"
538+
height="14"
539+
viewBox="0 0 24 24"
540+
fill="none"
541+
stroke="currentColor"
542+
strokeWidth="2"
543+
strokeLinecap="round"
544+
>
528545
<line x1="18" y1="6" x2="6" y2="18" />
529546
<line x1="6" y1="6" x2="18" y2="18" />
530547
</svg>

packages/studio/src/player/lib/playbackAdapter.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ describe("wrapTimeline seek keepPlaying option (#834)", () => {
1818
};
1919
}
2020

21-
it("default seek pauses the GSAP timeline before seeking", () => {
21+
it("default seek pauses the GSAP timeline before and after seeking", () => {
2222
const tl = mockTimeline();
2323
const adapter = wrapTimeline(tl);
2424

2525
adapter.seek(5);
2626

27-
expect(tl.pause).toHaveBeenCalledTimes(1);
27+
expect(tl.pause).toHaveBeenCalledTimes(2);
2828
expect(tl.seek).toHaveBeenCalledWith(5);
2929
});
3030

@@ -44,7 +44,7 @@ describe("wrapTimeline seek keepPlaying option (#834)", () => {
4444

4545
adapter.seek(5, { keepPlaying: false });
4646

47-
expect(tl.pause).toHaveBeenCalledTimes(1);
47+
expect(tl.pause).toHaveBeenCalledTimes(2);
4848
expect(tl.seek).toHaveBeenCalledWith(5);
4949
});
5050
});

packages/studio/src/utils/timelineAssetDrop.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ describe("insertTimelineAssetIntoSource", () => {
155155
'<img id="photo_asset" data-start="0" data-duration="3" />',
156156
);
157157

158-
expect(html).toContain('<div id="root" data-composition-id="main"><img id="photo_asset"');
158+
expect(html).toContain('data-composition-id="main">');
159+
expect(html).toContain('<img id="photo_asset"');
159160
});
160161
});

0 commit comments

Comments
 (0)