diff --git a/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/core_e2e.py b/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/core_e2e.py index a697b665..014ebef0 100644 --- a/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/core_e2e.py +++ b/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/core_e2e.py @@ -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), ) diff --git a/nix/tests/vm/suites/core-e2e/test.py b/nix/tests/vm/suites/core-e2e/test.py index f4155a0c..25b947f6 100644 --- a/nix/tests/vm/suites/core-e2e/test.py +++ b/nix/tests/vm/suites/core-e2e/test.py @@ -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, []), )