diff --git a/src/cli/loadCliProject.test.ts b/src/cli/loadCliProject.test.ts new file mode 100644 index 000000000..e4515d1a4 --- /dev/null +++ b/src/cli/loadCliProject.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it, vi } from "vitest"; +import { PROJECT_VERSION } from "@/components/video-editor/projectPersistence"; +import { getEditorSettings } from "@/lib/ai-edition/store/editorSettings"; +import { loadCliProject } from "./loadCliProject"; + +const loadProjectFileFromPath = vi.fn(); +vi.mock("@/native", () => ({ + nativeBridgeClient: { + project: { loadProjectFileFromPath: (p: string) => loadProjectFileFromPath(p) }, + }, +})); + +// `legacyProjectEditor` has its own tests in exportProject.test.ts; this one guards the loader +// actually using it, so a v2 export cannot drop the keys again behind a green helper test. +describe("loadCliProject", () => { + it("carries render settings the normalizer does not know into the exported document (#1467)", async () => { + loadProjectFileFromPath.mockResolvedValue({ + success: true, + project: { + version: PROJECT_VERSION, + media: { screenVideoPath: "/recordings/screen.mp4" }, + editor: { cursorModel3d: true, cursorClickSound: true, audioGainDb: -3 }, + }, + }); + vi.stubGlobal("window", { + electronAPI: { getCurrentRecordingSession: async () => ({ session: null }) }, + }); + // The probe's