fix: test fix to change clicks to box drawing
This commit is contained in:
+4
-1
@@ -22,6 +22,7 @@ test("adapter accepts tool calls and rejects truncated responses", async (t) =>
|
||||
test("tool descriptions advertise coordinate conventions", () => {
|
||||
const normalized = toolsForCoordinates("normalized_1000")[0]?.function.description ?? "";
|
||||
assert.match(normalized, /Coordinates must be normalized integers in the range \[0, 1000\], where \(0, 0\) is top-left and \(1000, 1000\) is bottom-right\./);
|
||||
assert.match(normalized, /ymin, xmin, ymax, and xmax/);
|
||||
|
||||
const pixels = toolsForCoordinates("pixels")[0]?.function.description ?? "";
|
||||
assert.match(pixels, /Click coordinates are screenshot pixels, not normalized coordinates\./);
|
||||
@@ -31,9 +32,11 @@ test("tool descriptions advertise coordinate conventions", () => {
|
||||
test("tool inputs reject invalid commands, bounds, and action names", () => {
|
||||
assert.throws(() => shellArguments.parse({ command: "", timeoutSeconds: 1 }));
|
||||
assert.throws(() => shellArguments.parse({ command: "true", timeoutSeconds: 999 }));
|
||||
assert.throws(() => desktopArguments.parse({ actions: [{ type: "click", x: -1, y: 0 }] }));
|
||||
assert.throws(() => desktopArguments.parse({ actions: [{ type: "click", ymin: -1, xmin: 0, ymax: 0, xmax: 0 }] }));
|
||||
assert.throws(() => desktopArguments.parse({ actions: [{ type: "click", x: 10, y: 20 }] }));
|
||||
assert.throws(() => desktopArguments.parse({ actions: [{ type: "execute" }] }));
|
||||
assert.deepEqual(desktopArguments.parse({ actions: [] }), { actions: [] });
|
||||
assert.throws(() => desktopArguments.parse({ actions: [{ type: "click_target", target: "1" }] }));
|
||||
assert.equal(desktopArguments.parse({ actions: [{ type: "click_target", target: "1", observationId: "frame" }] }).actions[0]?.type, "click_target");
|
||||
assert.equal(desktopArguments.parse({ actions: [{ type: "click", ymin: 10, xmin: 20, ymax: 30, xmax: 40 }] }).actions[0]?.type, "click");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user