feat(simulation): expose semantic UI snapshots (#37802)
This commit is contained in:
parent
86a468c4d8
commit
edc93ceff1
12 changed files with 477 additions and 43 deletions
|
|
@ -39,7 +39,7 @@ test("scopes the frontend control server and reports malformed JSON", async () =
|
|||
protocolVersion: 1,
|
||||
role: "ui",
|
||||
server: { name: "opencode", version: expect.any(String) },
|
||||
capabilities: expect.arrayContaining(["ui.state", "ui.capture"]),
|
||||
capabilities: expect.arrayContaining(["ui.state", "ui.snapshot", "ui.capture"]),
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -60,6 +60,13 @@ test("scopes the frontend control server and reports malformed JSON", async () =
|
|||
},
|
||||
})
|
||||
|
||||
socket.send(JSON.stringify({ jsonrpc: "2.0", id: 3, method: "ui.snapshot" }))
|
||||
expect(yield* Queue.take(messages)).toEqual({
|
||||
jsonrpc: "2.0",
|
||||
id: 3,
|
||||
result: { format: "opencode-ui-snapshot-v1", nodes: [] },
|
||||
})
|
||||
|
||||
socket.send("{")
|
||||
expect(yield* Queue.take(messages)).toMatchObject({
|
||||
id: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue