From a609230e1084ca2a4429d56fd85e4e1b55655cd6 Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Mon, 12 Oct 2026 14:19:36 +0800 Subject: [PATCH] test(windows-e2e): give a closing wait dialog two seconds before calling it unexpected When the running copy exits quickly, the second copy's wait dialog can still be closing, with only its title left, when Wait-Ready looks for dialogs; the release run for 2026.10.17 failed on that once. Look again after two seconds and fail only if a dialog is still there. Co-Authored-By: Claude Opus 5.5 --- scripts/windows-e2e.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/windows-e2e.ps1 b/scripts/windows-e2e.ps1 index 1c0fd33a..f7605d23 100644 --- a/scripts/windows-e2e.ps1 +++ b/scripts/windows-e2e.ps1 @@ -510,6 +510,11 @@ function Wait-Ready($proc, [string] $data, [string] $folder, [string] $label, [d Fail ('{0} 在就绪之前退出了(退出码 {1})。数据目录 {2}:{3}' -f $label, $proc.ExitCode, $data, (List-Dir $data)) } $d = Get-Dialog $proc.Id + if ($d) { + # 让位刚完成时,等待对话框可能正在关、只剩一个标题:过两秒还在才算 + Start-Sleep -Seconds 2 + $d = Get-Dialog $proc.Id + } if ($d) { $texts = (Get-Texts $d) -join ' | ' Raise $d