aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_actions.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-30 11:01:09 +0100
committerDanilo M. <danix@danix.xyz>2026-11-30 11:01:09 +0100
commit88f120cb544296f4c760546a204f1e2268a2e5dd (patch)
treebe14896616b3733556f3bc10a1406fc3c84d6044 /tests/test_actions.py
parent96355cff09db091f5251ae851c46b8d1dd67f7a0 (diff)
downloaddeck-it-88f120cb544296f4c760546a204f1e2268a2e5dd.tar.gz
deck-it-88f120cb544296f4c760546a204f1e2268a2e5dd.zip
feat(dashboard): drop the action icons row
The screenshot and lock buttons went unused; the keyboard is faster. The actions module keeps only the hyprlock watcher that sleeps and wakes the tablet, under the same name since keystone's module toggle uses it. [dashboard] actions is gone from the config and its validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_actions.py')
-rw-r--r--tests/test_actions.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/test_actions.py b/tests/test_actions.py
index e6f31e3..3a79692 100644
--- a/tests/test_actions.py
+++ b/tests/test_actions.py
@@ -22,41 +22,9 @@ sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
import subprocess
import unittest
-import deckit.config as config
-from deckit.module import ModuleError
from deckit.modules import actions
-class Actions(unittest.TestCase):
- def test_ids_match_the_config(self):
- self.assertEqual(tuple(actions.ACTIONS), config.ACTION_IDS)
-
- def test_state_lists_the_configured_actions_in_order(self):
- m = actions.make({"dashboard": {"actions": ["lock", "screenshot"]}})
- self.assertEqual([a["id"] for a in m.state()["actions"]], ["lock", "screenshot"])
- self.assertEqual(set(m.state()["actions"][0]), {"id", "label", "icon"})
-
- def test_only_configured_actions_run(self):
- calls = []
- m = actions.make({"dashboard": {"actions": ["lock"]}, "popen": calls.append})
- m.actions["lock"]({})
- self.assertEqual(calls, [["lock.sh"]])
- self.assertNotIn("screenshot", m.actions)
-
- def test_screenshot_opens_the_menu(self):
- calls = []
- m = actions.make({"dashboard": {"actions": ["screenshot"]}, "popen": calls.append})
- m.actions["screenshot"]({})
- self.assertEqual(calls, [["qar-scrotmenu.sh"]])
-
- def test_missing_command_is_a_module_error(self):
- def missing(cmd):
- raise FileNotFoundError(cmd[0])
- m = actions.make({"dashboard": {"actions": ["lock"]}, "popen": missing})
- with self.assertRaises(ModuleError):
- m.actions["lock"]({})
-
-
class Follow(unittest.TestCase):
def test_sleeps_on_lock_and_wakes_on_unlock(self):
keys = []