Implement SCUM direct data plane

This commit is contained in:
npc0-hue
2026-08-13 16:33:11 +08:00
parent b07a792784
commit 8b236d7c15
56 changed files with 1466 additions and 90 deletions
@@ -0,0 +1,20 @@
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { SCUMPersistedDataView, scumDatasetForPluginRoute } from "./SCUMPersistedDataView";
describe("SCUMPersistedDataView", () => {
it("maps the five declared SCUM plugin routes to persisted datasets", () => {
expect(scumDatasetForPluginRoute("players")).toBe("users");
expect(scumDatasetForPluginRoute("squads")).toBe("squads");
expect(scumDatasetForPluginRoute("workflows")).toBe("activity");
expect(scumDatasetForPluginRoute("gifts")).toBe("gifts");
expect(scumDatasetForPluginRoute("live-map")).toBe("map");
});
it("renders a themed loading state without synthetic records", () => {
const html = renderToStaticMarkup(<SCUMPersistedDataView serverInstanceId="server-1" dataset="users" />);
expect(html).toContain("正在读取用户同步数据");
expect(html).not.toContain("Prisoner One");
});
});