feat(*): 创作工作台 - 完善画布生成、模型定价与创建流程
This commit is contained in:
1 parent
a20df86cbd
commit
982021be93
39 files changed
+735
-242
No files matched your search
@@ -14,6 +14,7 @@ import {
|
||||
resetRemoteUserDataSync,
|
||||
saveRemoteUserDataNow,
|
||||
syncRemoteUserData,
|
||||
overwriteRemoteCanvasProject,
|
||||
} from "../src/services/user-data-sync";
|
||||
import { createAgentCanvasSync } from "../src/services/agent-canvas-sync";
|
||||
import { flushCanvasStorePersistence, useCanvasStore, type CanvasProject } from "../src/stores/canvas/use-canvas-store";
|
||||
@@ -216,6 +217,17 @@ test("stale viewport, no-op restore and open do not submit old content", async (
|
||||
expect(requests.filter((request) => request.method === "put")).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("explicit local overwrite replaces only the selected cloud canvas after a revision conflict", async () => {
|
||||
remote.set("canvas", { ...canvas(), title: "cloud edit", revision: 2 });
|
||||
useCanvasStore.getState().renameProject("canvas", "local edit");
|
||||
|
||||
await overwriteRemoteCanvasProject("canvas");
|
||||
|
||||
expect(remote.get("canvas")).toMatchObject({ title: "local edit", revision: 3 });
|
||||
expect(remote.get("other")).toMatchObject({ title: "other", revision: 1 });
|
||||
expect(useSyncProgressStore.getState().syncingProjects.canvas).toMatchObject({ phase: "done", cloudRevision: 3, pendingChanges: 0 });
|
||||
});
|
||||
|
||||
test("load latest, save and reload stay synced when Agent history replays an unversioned delta", async () => {
|
||||
remote.set("canvas", { ...canvas(), revision: 9 });
|
||||
await loadCanvasProjectForEditing("canvas", { latest: true });
|
||||
|
||||
Reference in new issue
Block a user