diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-09 20:31:56 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-09 20:31:56 +0100 |
| commit | 6b323fc06ec255153e86eafa4dffa67ad8c21f8c (patch) | |
| tree | bc361deaf28cf590f678f31f3fd4c31879688ef7 /tests | |
| parent | f59efbd2df7b33ea8d8320b6cd29792986ea8023 (diff) | |
| download | deck-it-6b323fc06ec255153e86eafa4dffa67ad8c21f8c.tar.gz deck-it-6b323fc06ec255153e86eafa4dffa67ad8c21f8c.zip | |
feat: Windows tab shows all workspaces and icon-only launchers
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_windows.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_windows.py b/tests/test_windows.py index 6aa7925..ca9be71 100644 --- a/tests/test_windows.py +++ b/tests/test_windows.py @@ -28,6 +28,21 @@ class Commands(unittest.TestCase): st = windows._state(lambda cmd: responses[tuple(cmd)]) self.assertEqual(st["workspaces"], [1, 2, 5]) + def test_state_includes_empty_workspaces_and_launch_icons(self): + responses = { + ("hyprctl", "clients", "-j"): "[]", + ("hyprctl", "activewindow", "-j"): "{}", + ("hyprctl", "workspaces", "-j"): '[{"id": 3}]', + } + m = windows.make({ + "windows": {"workspaces": [1, 2, 3, 4]}, + "launch": {"obs": {"icon": "obsstudio", "command": "obs"}}, + "run": lambda cmd: responses[tuple(cmd)], + }) + st = m.state() + self.assertEqual(st["workspaces"], [1, 2, 3, 4]) + self.assertEqual(st["launches"], [{"key": "obs", "icon": "obsstudio", "label": "obs"}]) + if __name__ == "__main__": unittest.main() |
