import { renderToStaticMarkup } from "react-dom/server"; import { describe, expect, it } from "vitest"; import { PluginLifecycleWorkbench } from "./PluginLifecycleWorkbench"; import lifecycleSource from "./PluginLifecycleWorkbench.tsx?raw"; describe("plugin operations components", () => { it("renders persisted loading states without optimistic terminal success", () => { expect(renderToStaticMarkup()).toContain("正在同步插件生命周期"); expect(lifecycleSource).not.toContain("setTimeout"); expect(lifecycleSource).not.toMatch(/apiKeyRef|rawApiKey|runSocket|providerBaseUrl|hostPath|directRun/i); expect(lifecycleSource).toContain("disabled="); expect(lifecycleSource).toContain("if (!selectedServerId || busy) return"); }); });