fix(webui): snapshot mutation replay frames

This commit is contained in:
chengyongru
2026-08-16 21:40:14 +08:00
committed by chengyongru
parent e51ffc8978
commit 2b6a0443c0
2 changed files with 24 additions and 10 deletions
+4 -4
View File
@@ -183,12 +183,12 @@ describe("NanobotClient", () => {
const firstSocket = lastSocket();
firstSocket.fakeOpen();
const pending = client.requestMutation<{ ran: boolean }>(
"automation.run",
{ id: "daily-summary" },
);
const payload = { id: "daily-summary", options: { force: false } };
const pending = client.requestMutation<{ ran: boolean }>("automation.run", payload);
const frame = firstSocket.sent.at(-1) as string;
const requestId = JSON.parse(frame).request_id;
payload.id = "weekly-summary";
payload.options.force = true;
const settled = expect(pending).resolves.toEqual({ ran: true });
firstSocket.fakeCloseWithCode(1006);