From b60a49409d3a684ed51decdc505d31aa7092e7eb Mon Sep 17 00:00:00 2001 From: creatixchu Date: Thu, 24 Sep 2026 11:45:17 +0800 Subject: [PATCH] test(cua): compare file panel URLs by filesystem identity --- packages/experimental/cua/native/tests/e2e.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/experimental/cua/native/tests/e2e.py b/packages/experimental/cua/native/tests/e2e.py index 8ab5b5c341..49735fae2a 100644 --- a/packages/experimental/cua/native/tests/e2e.py +++ b/packages/experimental/cua/native/tests/e2e.py @@ -68,7 +68,8 @@ def check_file_panel(call, owner, primary_params, primary, directory, wait_state "Go to folder did not select the requested file") open_button = next(e for e in ready["elements"] if e["identifier"] == "OKButton") call("click", {**owner, "snapshotId": ready["snapshotId"], "elementIndex": open_button["index"]}) - wait_state(lambda state: state["selectedFile"] == str(selected_file), "File picker did not return the intended URL") + wait_state(lambda state: bool(state["selectedFile"]) and Path(state["selectedFile"]).samefile(selected_file), + "File picker did not return the intended file") call("getState", {**primary_params, "windowId": sheet_id}, "WINDOW_UNAVAILABLE")