From 88f120cb544296f4c760546a204f1e2268a2e5dd Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 30 Nov 2026 11:01:09 +0100 Subject: 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 --- tests/test_actions.py | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'tests/test_actions.py') 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 = [] -- cgit v1.2.3