From db6ecce881d963fbf6d8ab7996522a79017ccfe2 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 30 Nov 2026 16:44:19 +0100 Subject: [PATCH] Check native undo after drawing through the canvas --- .github/macos-undo-check.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/macos-undo-check.py b/.github/macos-undo-check.py index d0638f6a9a..4b85e1a6f2 100644 --- a/.github/macos-undo-check.py +++ b/.github/macos-undo-check.py @@ -60,7 +60,12 @@ try: print("Control key M selected:",tool,flush=True) if tool != "rectangle": raise RuntimeError("OS key input did not reach the app; no Undo result can be inferred") - made=engine("shape.rectangle",x=20,y=20,width=60,height=50)["id"] + call("ui.drag", dict(x=x+w*.35,y=y+h*.36,toX=x+w*.55,toY=y+h*.59,steps=9)) + time.sleep(.5) + doc=engine("document.inspect") + children=[child for layer in doc["layers"] for child in layer.get("children",[])] + assert len(children)==1, ("GUI gesture did not draw exactly one rectangle",doc) + made=children[0]["id"] def exists(): doc=engine("document.inspect") return any(child["id"]==made for layer in doc["layers"] for child in layer.get("children",[]))