import type { ComponentType } from "react"; import { cleanup, fireEvent, screen } from "@testing-library/react"; import { renderWithProviders } from "@multiplatform.one/test-utils"; import { afterEach, expect, it, vi } from "vitest"; import { Undo } from "./AutoLayout.stories"; vi.mock("../native/DomOnlyStory", () => ({ hasDomRealm: false })); vi.mock("../NodeGraph", () => ({ NodeGraph: ({ interactionMode }: { interactionMode: string }) => (
), })); afterEach(cleanup); it("keeps useful native actions, omits the DOM-only stamp, and wires mode to the canvas", () => { const Story = Undo.render as ComponentType; renderWithProviders(