mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 22:33:12 +01:00
test(nix): maximizing.user has toggle-monocle as both ports do
toggle-monocle leaves IGNORED: it turns the monocle of the tiles that are left on and off while the window stays maximized, as probed on komorebi for Windows.
This commit is contained in:
1 parent
3e7451f132
commit
7d19fd4045
3 files changed
+32
-5
No files matched your search
@@ -60,8 +60,9 @@ def run(platform: Platform, checks: Checks, clients: list[Client]) -> None:
|
|||||||
|
|
||||||
# What is asked of the layout, which a maximized window is not in: none of it does anything. Not in
|
# What is asked of the layout, which a maximized window is not in: none of it does anything. Not in
|
||||||
# the list, because komorebi for Windows does not ignore them either: `toggle-float`, which floats
|
# the list, because komorebi for Windows does not ignore them either: `toggle-float`, which floats
|
||||||
# the maximized window (`user` ends with it), and `stack left` and `stack right`, which stack the
|
# the maximized window (`user` ends with it), `stack left` and `stack right`, which stack the tiles
|
||||||
# tiles that are left.
|
# that are left, and `toggle-monocle`, which turns the monocle of the tiles that are left on while
|
||||||
|
# the window stays maximized (`user` has it too).
|
||||||
IGNORED = (
|
IGNORED = (
|
||||||
"move left",
|
"move left",
|
||||||
"move right",
|
"move right",
|
||||||
@@ -70,7 +71,6 @@ IGNORED = (
|
|||||||
"unstack",
|
"unstack",
|
||||||
"cycle-move next",
|
"cycle-move next",
|
||||||
"promote",
|
"promote",
|
||||||
"toggle-monocle",
|
|
||||||
"resize-edge left increase",
|
"resize-edge left increase",
|
||||||
"send-to-workspace 1",
|
"send-to-workspace 1",
|
||||||
"move-to-workspace 1",
|
"move-to-workspace 1",
|
||||||
@@ -135,6 +135,34 @@ def user(platform: Platform, checks: Checks, clients: list[Client]) -> None:
|
|||||||
containers() == count - 1 and workspace.floating == [] and workspace.monocle is None,
|
containers() == count - 1 and workspace.floating == [] and workspace.monocle is None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# `toggle-monocle` is not ignored: the monocle of the tiles that are left comes on and goes off,
|
||||||
|
# and the window stays maximized, as on komorebi for Windows
|
||||||
|
platform.komorebic("toggle-monocle")
|
||||||
|
checks.check(
|
||||||
|
"toggle-monocle turns the monocle of the tiles that are left on, and the window stays"
|
||||||
|
" maximized",
|
||||||
|
platform.wait_for(
|
||||||
|
lambda: (
|
||||||
|
platform.state().workspace().monocle is not None and maximized() == target.title
|
||||||
|
),
|
||||||
|
timeout=20,
|
||||||
|
)
|
||||||
|
and fills(target),
|
||||||
|
)
|
||||||
|
platform.komorebic("toggle-monocle")
|
||||||
|
checks.check(
|
||||||
|
"... and again turns it off, with the window still maximized",
|
||||||
|
platform.wait_for(
|
||||||
|
lambda: (
|
||||||
|
platform.state().workspace().monocle is None
|
||||||
|
and maximized() == target.title
|
||||||
|
and containers() == count - 1
|
||||||
|
),
|
||||||
|
timeout=20,
|
||||||
|
)
|
||||||
|
and fills(target),
|
||||||
|
)
|
||||||
|
|
||||||
platform.komorebic("toggle-maximize")
|
platform.komorebic("toggle-maximize")
|
||||||
checks.check(
|
checks.check(
|
||||||
f"toggle-maximize restores it: nothing is maximized and {target.title} is in its tile",
|
f"toggle-maximize restores it: nothing is maximized and {target.title} is in its tile",
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ ASKED_OF_THE_LAYOUT = (
|
|||||||
"unstack",
|
"unstack",
|
||||||
"cycle-move",
|
"cycle-move",
|
||||||
"promote",
|
"promote",
|
||||||
"toggle-monocle",
|
|
||||||
"resize-edge",
|
"resize-edge",
|
||||||
"send-to-workspace",
|
"send-to-workspace",
|
||||||
"move-to-workspace",
|
"move-to-workspace",
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ def test_a_daemon_that_takes_up_a_maximize_passes_user_maximize() -> None:
|
|||||||
base = checks.passed
|
base = checks.passed
|
||||||
maximizing.user(platform, checks, clients)
|
maximizing.user(platform, checks, clients)
|
||||||
assert checks.failed == 0, checks.failures
|
assert checks.failed == 0, checks.failures
|
||||||
assert checks.passed - base == 10
|
assert checks.passed - base == 12
|
||||||
|
|
||||||
|
|
||||||
def test_a_daemon_that_obeys_commands_when_maximized_fails_user_maximize() -> None:
|
def test_a_daemon_that_obeys_commands_when_maximized_fails_user_maximize() -> None:
|
||||||
|
|||||||
Reference in new issue
Block a user