Implement SCUM direct data plane
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user