test: use canonical workspace API fixtures

This commit is contained in:
2026-08-09 20:44:35 +02:00
parent a681c431fb
commit d77c08884b
4 changed files with 51 additions and 13 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { http, HttpResponse } from "msw";
import { server } from "../test/msw";
import { canonicalWorkspaceFixture } from "../test/workspace-fixtures";
import { createSession, getMe, listSessions, prewarmRuntime, resumeSession } from "./sessions";
import {
renameSession, setSessionGroup, archiveSession, unarchiveSession,
@@ -18,7 +19,7 @@ test("createSession migrates legacy selections and POSTs browser preferences", a
revision: { id: "psd-clinical", commit: "a".repeat(40), blob: "b".repeat(40), snapshotPath: "/snapshot", state: "operational" },
}])),
http.get("/api/workspaces/psd-clinical", () => HttpResponse.json({
workspace: { llm_policy: { allowed: ["zai/glm-5.2"] } },
workspace: canonicalWorkspaceFixture("psd-clinical"),
revision: { id: "psd-clinical", commit: "a".repeat(40), blob: "b".repeat(40), snapshotPath: "/snapshot", state: "operational" },
})),
http.post("/api/sessions", async ({ request }) => {