feat(nix): core-e2e leaves KWin restarts to the kwin-restart suite

This commit is contained in:
LGUG2Z committed 2026-10-30 12:03:01 -07:00
1 parent cc32260230
commit 3fba34cbec
2 files changed
+6 -32

No files matched your search

@@ -289,39 +289,13 @@ def parking(platform: KdePlatform, checks: Checks, clients: list[Client]) -> Non
platform.close(client)
def kwin_restart(platform: KdePlatform, checks: Checks, clients: list[Client]) -> None:
"""KWin restarts under the daemon: it loads its script into the new KWin, lets go of the
windows of the old one, and tiles what opens there. The suite ends with a window of the new
KWin, `afterwards`."""
kde = platform.kde
loaded = kde.komorebi_log().count("loaded the KWin bridge script")
kde.restart_kwin()
checks.check(
"the daemon loaded its script into the new KWin",
kde.wait_for(
lambda: kde.komorebi_log().count("loaded the KWin bridge script") == loaded + 1,
timeout=30,
),
)
checks.check(
"the daemon let go of the windows of the old KWin",
kde.wait_for(lambda: kde.managed_all() == 0),
)
def leave_a_window(platform: KdePlatform, checks: Checks, clients: list[Client]) -> None:
"""Opens the window `afterwards`, which `stopped` finds still open after the daemon stops. The
`kwin-restart` suite covers KWin restarting under the daemon."""
platform.spawn("afterwards")
checks.check(
"a window opened in the new KWin is managed",
kde.wait_for(lambda: kde.managed_all() == 1),
)
width = platform.size[0]
checks.check(
"... and tiled on its own",
kde.wait_for(
lambda: (
_where_asked(platform, "afterwards")
and kde.rect(kde.wid("afterwards")).w > width - 100
),
timeout=20,
),
"a window opened is managed",
platform.kde.wait_for(lambda: platform.kde.managed_all() >= 1, timeout=20),
)
+1 -1
View File
@@ -176,7 +176,7 @@ run_suite(
),
# what only KDE can tell about the daemon stopping, crashing, and KWin restarting
platform_only("kde", kde_core.parking, platform, checks, []),
platform_only("kde", kde_core.kwin_restart, platform, checks, []),
platform_only("kde", kde_core.leave_a_window, platform, checks, []),
platform_only("kde", kde_core.stopped, platform, checks, []),
)