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",[]))