Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/ai-edition/EditorEmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export function EditorEmptyState({
<div className={styles.previewEmptyActions}>
<button
type="button"
data-testid="editor-empty-import-video-button"
onClick={() => void handleImportVideo()}
className={styles.previewEmptyPrimaryButton}
>
Expand All @@ -232,6 +233,7 @@ export function EditorEmptyState({
{showLoadProjectButton && !hasProject ? (
<button
type="button"
data-testid="editor-empty-load-project-button"
onClick={() => void handleLoadProject()}
className={styles.previewEmptySecondaryButton}
>
Expand Down
13 changes: 9 additions & 4 deletions tests/e2e/windows-native-checklist.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,13 @@ test.describe("Windows native checklist smoke tests", () => {
}));
}, testVideoInRecordings);

await hudWindow.getByTestId("launch-open-video-button").click();
await hudWindow.getByTestId("launch-open-studio-button").click();
const editorWindow = await app.waitForEvent("window", {
predicate: (w) => w.url().includes("windowType=editor"),
timeout: 15_000,
});
await editorWindow.waitForLoadState("domcontentloaded");
await editorWindow.getByTestId("editor-empty-import-video-button").click();
await expect(editorWindow.getByText("Loading video...")).not.toBeVisible({ timeout: 20_000 });

const playButton = editorWindow.locator(
Expand All @@ -208,7 +209,7 @@ test.describe("Windows native checklist smoke tests", () => {
await expect.poll(() => seekInput.inputValue(), { timeout: 10_000 }).not.toBe("0");

await expect(
editorWindow.getByText("Background").or(editorWindow.getByText("Arrière-plan")),
editorWindow.getByText("Background").or(editorWindow.getByText("Arrière-plan")).first(),
).toBeVisible();
await expect(editorWindow.getByRole("button", { name: "Export", exact: true })).toBeVisible();
} finally {
Expand Down Expand Up @@ -262,7 +263,10 @@ test.describe("Windows native checklist smoke tests", () => {
return success({ success: false, canceled: true });
}
if (request.domain === "project" && request.action === "getCurrentVideoPath") {
return success({ success: true, path: payload.videoPath });
// No video set yet at editor mount time — the editor must show
// EditorEmptyState so the test can click "Load Project" itself,
// rather than short-circuiting straight into a "loaded" state.
return success({ success: false });
}
if (request.domain === "system" && request.action === "getPlatform") {
return success("win32");
Expand Down Expand Up @@ -301,12 +305,13 @@ test.describe("Windows native checklist smoke tests", () => {
},
);

await hudWindow.getByTestId("launch-open-project-button").click();
await hudWindow.getByTestId("launch-open-studio-button").click();
const editorWindow = await app.waitForEvent("window", {
predicate: (w) => w.url().includes("windowType=editor"),
timeout: 15_000,
});
await editorWindow.waitForLoadState("domcontentloaded");
await editorWindow.getByTestId("editor-empty-load-project-button").click();
await expect(editorWindow.getByText("Loading video...")).not.toBeVisible({ timeout: 20_000 });
await expect(editorWindow.getByRole("button", { name: "Export", exact: true })).toBeVisible();
} finally {
Expand Down
Loading