mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 06:11:21 +01:00
feat(e2e): sync the neutral core from kfde 8b86c8ee
The commands sweep plugs in a second display first when the platform has only one. From kfde change xzwqolrv.
This commit is contained in:
1 parent
72681c9913
commit
d2adcc9c28
2 files changed
+18
-1
No files matched your search
@@ -321,7 +321,14 @@ def sweep(
|
||||
) -> None:
|
||||
"""Runs every command of `commands` (`SWEEP`), and checks that it is understood and leaves the
|
||||
daemon healthy. `config` is the path, on the platform, of a file the daemon can be told to
|
||||
load."""
|
||||
load.
|
||||
|
||||
The sweep has commands that name the second monitor (`send-to-monitor 1`), so it needs two
|
||||
displays: one is plugged in first if the platform has only one.
|
||||
"""
|
||||
if len(platform.displays()) < 2:
|
||||
platform.add_display()
|
||||
platform.wait_for(lambda: len(platform.state().monitors) >= 2, timeout=30)
|
||||
for line in commands:
|
||||
words = line.format(config=config).split()
|
||||
status, out = platform.komorebic_status(*words)
|
||||
|
||||
@@ -202,3 +202,13 @@ def test_a_daemon_that_does_not_see_the_displays_fails_hotplug() -> None:
|
||||
clients = opened(platform, checks)
|
||||
hotplug.run(platform, checks, clients)
|
||||
assert any("a monitor for each display" in f for f in checks.failures)
|
||||
|
||||
|
||||
def test_the_sweep_plugs_in_a_second_display_when_there_is_only_one() -> None:
|
||||
platform = FakePlatform()
|
||||
platform.display_count = 1
|
||||
checks = Checks()
|
||||
clients = opened(platform, checks)
|
||||
commands.sweep(platform, checks, clients, config="unused", commands=("focus right",))
|
||||
assert platform.display_count == 2
|
||||
assert checks.failed == 0, checks.failures
|
||||
Reference in new issue
Block a user