Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/components/ai-edition/NewEditorShell.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,12 @@
align-items: center;
gap: var(--sp-2);
padding: 12px var(--sp-4);
/* Every pane wearing this header is rendered inside FloatingInspector, which
floats its "Collapse inspector" button (right: 12, 26px wide) over the
header's right edge — landing squarely on whatever sits there and
swallowing its clicks. The Help button was the casualty: visible on every
facet, and unclickable. Reserve the floated button its own lane instead. */
padding-right: 46px;
border-bottom: 1px solid var(--border-soft);
min-height: 44px;
}
Expand Down
209 changes: 0 additions & 209 deletions tests/e2e/diagnostic.spec.ts

This file was deleted.

39 changes: 39 additions & 0 deletions tests/e2e/editor-smoke.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Boot smoke test for the v4 editor shell: no project seeded, so this is the
// cold-start path a user hits before they have anything to edit. Its companion
// `v4-shell.spec.ts` always seeds a document; this one deliberately doesn't —
// the empty state is its own render branch (Preview → EditorEmptyState) and the
// only thing that catches a mount-time crash with an empty shim.
//
// Needs a dev server: `npm run dev` (default 5173, override with E2E_BASE_URL).
import { expect, test } from "@playwright/test";

const BASE_URL = process.env.E2E_BASE_URL ?? "http://localhost:5173";
const EDITOR_URL = `${BASE_URL}/?windowType=editor`;

test("editor boots into the empty state with no project, and logs no console errors", async ({
page,
}) => {
const consoleErrors: string[] = [];
page.on("console", (msg) => {
if (msg.type() === "error") consoleErrors.push(msg.text());
});
page.on("pageerror", (err) => consoleErrors.push(`pageerror: ${err.message}`));

// A fresh Playwright context has empty localStorage, so the shell's mount
// effect finds no project via listProjects() and renders the empty branch.
await page.goto(EDITOR_URL, { waitUntil: "domcontentloaded" });

// Preview shell — the transport-state hooks the editor exposes to the outside.
const preview = page.getByTestId("preview");
await expect(preview).toBeVisible();
await expect(preview).toHaveAttribute("data-current-time-sec", /^\d+(\.\d+)?$/);
await expect(preview).toHaveAttribute("data-is-playing", /^(true|false)$/);
await expect(preview).toContainText("No project open");

// Timeline mounts even with nothing on it (V4Timeline's tools toolbar).
await expect(page.getByRole("toolbar", { name: "Timeline tools" })).toBeVisible();
// Top bar mounted, defaulting to Edit mode.
await expect(page.getByRole("tab", { name: "Edit" })).toHaveAttribute("aria-selected", "true");

expect(consoleErrors, `console errors:\n${consoleErrors.join("\n")}`).toEqual([]);
});
Loading
Loading