ci(windows): GUI E2E fully green — foreground relaunched window, drop temp trigger
The real-user-flow job passed end to end (run 31492613931, 10m57s): website Hermes-Setup.exe installed headed (AHK Install+Launch, real app window), then TWO GUI updates driven by real Settings -> About -> 'Update now' clicks, each carried through the detached hand-off to a relaunched desktop on the target commit. Every assertion green on both legs (marker cleanup, checkout on target sha, working hermes, relaunch). Two finishing touches: * Foreground the relaunched Hermes window before the 99-relaunched proof screenshot — the full-desktop grab is z-order dependent and one run caught VS Code on top. The relaunch ASSERT already passed on the process signal; this is purely to make the proof image show Hermes. * Remove the temporary branch push trigger used for pre-merge validation; back to main + nightly + release tags + manual dispatch only.
This commit is contained in:
@@ -499,6 +499,22 @@ function Invoke-GuiUpdateLeg([string]$TargetSha, [string]$LegName, [string]$LegS
|
||||
}
|
||||
Assert-True ($null -ne $relaunched) "$LegName -- updater relaunched the desktop app"
|
||||
Start-Sleep -Seconds 12 # let the window paint for the screenshot
|
||||
# Foreground the relaunched Hermes window so the proof screenshot
|
||||
# captures IT, not whatever else is on top (the full-desktop grab is
|
||||
# otherwise at the mercy of z-order -- an earlier run caught VS Code).
|
||||
try {
|
||||
$mainProc = Get-Process -Name "Hermes" -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.MainWindowHandle -ne 0 } | Select-Object -First 1
|
||||
if ($mainProc) {
|
||||
Add-Type -Namespace HdE2E -Name Win -MemberDefinition @'
|
||||
[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool SetForegroundWindow(System.IntPtr h);
|
||||
[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool ShowWindow(System.IntPtr h, int n);
|
||||
'@ -ErrorAction SilentlyContinue
|
||||
[HdE2E.Win]::ShowWindow($mainProc.MainWindowHandle, 9) | Out-Null # SW_RESTORE
|
||||
[HdE2E.Win]::SetForegroundWindow($mainProc.MainWindowHandle) | Out-Null
|
||||
Start-Sleep -Seconds 2
|
||||
}
|
||||
} catch {}
|
||||
Save-DesktopScreenshot (Join-Path $proof "99-relaunched-desktop.png")
|
||||
}
|
||||
finally {
|
||||
|
||||
Reference in New Issue
Block a user