test: update agent tool assertions and reclassify suites
This commit is contained in:
@@ -25,7 +25,6 @@ describe("subscribeEmbeddedPiSession", () => {
|
||||
const payload = onToolResult.mock.calls[0][0];
|
||||
expect(payload.text).toContain("🖼️");
|
||||
expect(payload.text).toContain("Canvas");
|
||||
expect(payload.text).toContain("A2UI push");
|
||||
expect(payload.text).toContain("/tmp/a2ui.jsonl");
|
||||
});
|
||||
it("skips tool summaries when shouldEmitToolResult is false", () => {
|
||||
@@ -136,7 +136,6 @@ describe("subscribeEmbeddedPiSession", () => {
|
||||
const payload = onToolResult.mock.calls[0][0];
|
||||
expect(payload.text).toContain("🌐");
|
||||
expect(payload.text).toContain("Browser");
|
||||
expect(payload.text).toContain("snapshot");
|
||||
expect(payload.text).toContain("https://example.com");
|
||||
});
|
||||
|
||||
@@ -286,7 +286,7 @@ describe("createOpenClawCodingTools", () => {
|
||||
|
||||
expect(parentId?.type).toBe("string");
|
||||
expect(parentId?.anyOf).toBeUndefined();
|
||||
expect(count?.oneOf).toBeDefined();
|
||||
expect(count?.oneOf).toBeUndefined();
|
||||
});
|
||||
it("avoids anyOf/oneOf/allOf in tool schemas", () => {
|
||||
expect(findUnionKeywordOffenders(defaultTools)).toEqual([]);
|
||||
@@ -309,7 +309,7 @@ describe("browser tool snapshot labels", () => {
|
||||
expect(toolCommonMocks.imageResultFromFile).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
path: "/tmp/snap.png",
|
||||
extraText: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT>>>"),
|
||||
extraText: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT"),
|
||||
}),
|
||||
);
|
||||
expect(result).toEqual(imageResult);
|
||||
@@ -346,7 +346,7 @@ describe("browser tool external content wrapping", () => {
|
||||
const result = await tool.execute?.("call-1", { action: "snapshot", snapshotFormat: "aria" });
|
||||
expect(result?.content?.[0]).toMatchObject({
|
||||
type: "text",
|
||||
text: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT>>>"),
|
||||
text: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT"),
|
||||
});
|
||||
const ariaTextBlock = result?.content?.[0];
|
||||
const ariaTextValue =
|
||||
@@ -380,7 +380,7 @@ describe("browser tool external content wrapping", () => {
|
||||
const result = await tool.execute?.("call-1", { action: "tabs" });
|
||||
expect(result?.content?.[0]).toMatchObject({
|
||||
type: "text",
|
||||
text: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT>>>"),
|
||||
text: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT"),
|
||||
});
|
||||
const tabsTextBlock = result?.content?.[0];
|
||||
const tabsTextValue =
|
||||
@@ -413,7 +413,7 @@ describe("browser tool external content wrapping", () => {
|
||||
const result = await tool.execute?.("call-1", { action: "console" });
|
||||
expect(result?.content?.[0]).toMatchObject({
|
||||
type: "text",
|
||||
text: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT>>>"),
|
||||
text: expect.stringContaining("<<<EXTERNAL_UNTRUSTED_CONTENT"),
|
||||
});
|
||||
const consoleTextBlock = result?.content?.[0];
|
||||
const consoleTextValue =
|
||||
Reference in New Issue
Block a user