From 9b1494d8d28f4756eb56ef7b179f3763a6f64a1c Mon Sep 17 00:00:00 2001 From: creatixchu Date: Wed, 30 Sep 2026 13:24:16 +0800 Subject: [PATCH] test(cua): await foreground fixture readiness --- packages/computer-use/cua/native/tests/axless_e2e.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/computer-use/cua/native/tests/axless_e2e.py b/packages/computer-use/cua/native/tests/axless_e2e.py index 17346492c7..1c2217519c 100644 --- a/packages/computer-use/cua/native/tests/axless_e2e.py +++ b/packages/computer-use/cua/native/tests/axless_e2e.py @@ -124,7 +124,8 @@ def main(): shutil.copy2(binary, foreground_binary) pending_foreground = helper.call('getApp', {'selector': str(foreground_binary.parents[2])}) foreground = helper.call('launchApp', {'appHandle': pending_foreground['appHandle']})['pid'] - wait_state(lambda state: not state['active'], 'foreground fixture did not take focus') + wait_state(lambda state: foreground_path.exists() and json.loads(foreground_path.read_text()).get('active') + and not state['active'], 'foreground fixture did not take focus') for number, key, target in [(signal.SIGALRM, 'hidden', owner), (signal.SIGHUP, 'minimized', {**owner, 'windowId': window_id})]: os.kill(fixture, number)