feat(core): add session snapshot and revert system (#33226)
This commit is contained in:
parent
25c6abc31a
commit
9bb5370205
42 changed files with 2311 additions and 365 deletions
|
|
@ -9,7 +9,7 @@ describe("public event manifest", () => {
|
|||
expect(EventManifest.Definitions).toBe(SchemaEventManifest.Definitions)
|
||||
expect(EventManifest.Latest).toBe(SchemaEventManifest.Latest)
|
||||
expect(EventManifest.Durable).toBe(SchemaEventManifest.Durable)
|
||||
expect(EventManifest.Latest.size).toBe(85)
|
||||
expect(EventManifest.Latest.size).toBe(88)
|
||||
expect(EventManifest.Latest.get("session.next.step.ended")).toBe(SessionEvent.Step.Ended)
|
||||
expect(EventManifest.Latest.get("todo.updated")).toBe(Todo.Event.Updated)
|
||||
expect(EventManifest.Latest.has("ide.installed")).toBe(false)
|
||||
|
|
|
|||
|
|
@ -980,6 +980,28 @@ const scenarios: Scenario[] = [
|
|||
headers: ctx.headers(),
|
||||
}))
|
||||
.json(404, object, "status"),
|
||||
http.protected
|
||||
.post("/api/session/{sessionID}/revert/stage", "v2.session.revert.stage")
|
||||
.at((ctx) => ({
|
||||
path: route("/api/session/{sessionID}/revert/stage", { sessionID: "ses_httpapi_missing" }),
|
||||
headers: { ...ctx.headers(), "content-type": "application/json" },
|
||||
body: { messageID: "msg_httpapi_missing" },
|
||||
}))
|
||||
.json(404, object, "status"),
|
||||
http.protected
|
||||
.post("/api/session/{sessionID}/revert/clear", "v2.session.revert.clear")
|
||||
.at((ctx) => ({
|
||||
path: route("/api/session/{sessionID}/revert/clear", { sessionID: "ses_httpapi_missing" }),
|
||||
headers: ctx.headers(),
|
||||
}))
|
||||
.json(404, object, "status"),
|
||||
http.protected
|
||||
.post("/api/session/{sessionID}/revert/commit", "v2.session.revert.commit")
|
||||
.at((ctx) => ({
|
||||
path: route("/api/session/{sessionID}/revert/commit", { sessionID: "ses_httpapi_missing" }),
|
||||
headers: ctx.headers(),
|
||||
}))
|
||||
.json(404, object, "status"),
|
||||
http.protected
|
||||
.get("/api/session/{sessionID}/message", "v2.session.messages")
|
||||
.at((ctx) => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue