fix(runner): keep the action the app was relaunched after

This commit is contained in:
pj committed 2026-08-15 20:42:20 +05:30
1 parent 99160b4c12
commit ca969f495a
2 files changed
+49 -14

No files matched your search

+4 -2
View File
@@ -1894,8 +1894,10 @@ func TestEnsureForeground_DismissesSystemOverlay(t *testing.T) {
logger := slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelWarn}))
options := Options{BundleID: "app.folio", Driver: m, IdleTimeout: 10 * time.Millisecond}
if !ensureForeground(context.Background(), options, logger, 5) {
t.Fatal("expected the guard to act on the focus-stealing overlay")
got := ensureForeground(context.Background(), options, logger, 5)
if got != foregroundOverlayDismissed {
t.Fatalf("the guard reported %v, want foregroundOverlayDismissed; "+
"an obscured app is not a relaunched one", got)
}
backs, relaunches := 0, 0
for _, a := range m.Actions() {