feat: add UE4SS DLL runtime extension
This commit is contained in:
@@ -3,6 +3,7 @@ import { describe, expect, it } from "vitest";
|
||||
import { configDiffViewFromPreview } from "./ServerDetailPage";
|
||||
import serverDetailPageSource from "./ServerDetailPage.tsx?raw";
|
||||
import clientManagerLifecyclePanelSource from "../components/ClientManagerLifecyclePanel.tsx?raw";
|
||||
import runtimeDLLExtensionsPanelSource from "../components/RuntimeDLLExtensionsPanel.tsx?raw";
|
||||
import artifactTransferSource from "../utils/artifactTransfer.ts?raw";
|
||||
import type { ServerConfigDiffPreviewResponse } from "../api/types";
|
||||
|
||||
@@ -103,6 +104,17 @@ describe("ServerDetailPage config write approval", () => {
|
||||
expect(serverDetailPageSource).not.toContain("sqlite://");
|
||||
});
|
||||
|
||||
it("renders declared UE4SS DLL update policy without local paths or RCON secrets", () => {
|
||||
expect(serverDetailPageSource).toContain("RuntimeDLLExtensionsPanel");
|
||||
expect(runtimeDLLExtensionsPanelSource).toContain("启动前自动校验和更新");
|
||||
expect(runtimeDLLExtensionsPanelSource).toContain("运行:SCUM 服务器受监管启动");
|
||||
expect(runtimeDLLExtensionsPanelSource).toContain("由 UE4SS 正常加载");
|
||||
expect(runtimeDLLExtensionsPanelSource).toContain("Linux 启动前拒绝");
|
||||
for (const forbidden of ["dllRef", "targetKey", "rconPort", "password="]) {
|
||||
expect(runtimeDLLExtensionsPanelSource).not.toContain(forbidden);
|
||||
}
|
||||
});
|
||||
|
||||
it("loads the dependency catalog only after runtime actions expose dependency operations", () => {
|
||||
const runtimeDistributionSectionSource = serverDetailPageSource.split("function RuntimeDistributionSection")[1]?.split("function RuntimeBindingFields")[0] ?? "";
|
||||
expect(runtimeDistributionSectionSource).toContain('action.key === "dependencies-check" || action.key === "dependencies-install"');
|
||||
|
||||
Reference in New Issue
Block a user