diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-15 22:00:37 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-15 22:00:37 -0500 |
| commit | 48d8b2ccca1890aa33da8f49a6ddb661271a2c77 (patch) | |
| tree | c0408e693ecff7b2be2c676cbdab43cc876a3c67 /tests | |
| parent | 1eb7a353fc1dcb16d660121938a728d9b6b83fc0 (diff) | |
| download | dotemacs-48d8b2ccca1890aa33da8f49a6ddb661271a2c77.tar.gz dotemacs-48d8b2ccca1890aa33da8f49a6ddb661271a2c77.zip | |
feat(dashboard): add a Signal launcher
Signal joins the dashboard launchers on key S (icon nf-md-message), opening cj/signel-message. Row sizes go 4-4-3-3 so Slack, Linear, and Signal share the last navigator row.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-dashboard-config-launchers.el | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/tests/test-dashboard-config-launchers.el b/tests/test-dashboard-config-launchers.el index 397a8fcf1..e7e8d2f33 100644 --- a/tests/test-dashboard-config-launchers.el +++ b/tests/test-dashboard-config-launchers.el @@ -26,20 +26,21 @@ (require 'dashboard-config) ;; Telegram moved from "g" to "G" so "g" is free for dashboard refresh. -(defconst test-dash--keys '("c" "d" "t" "a" "r" "b" "f" "m" "e" "i" "G" "s" "l")) +;; Signal ("S") added as the 14th launcher. +(defconst test-dash--keys '("c" "d" "t" "a" "r" "b" "f" "m" "e" "i" "G" "s" "l" "S")) ;; ----------------------------- launcher table -------------------------------- (ert-deftest test-dashboard-launchers-keys-in-order () - "Normal: 13 launchers with the expected keys in display order." - (should (= 13 (length cj/dashboard--launchers))) + "Normal: 14 launchers with the expected keys in display order." + (should (= 14 (length cj/dashboard--launchers))) (should (equal test-dash--keys (mapcar (lambda (l) (nth 0 l)) cj/dashboard--launchers)))) (ert-deftest test-dashboard-launchers-labels-in-order () "Normal: labels in display order (Telegram and Slack reordered so Slack sits next to Linear on the last navigator row)." (should (equal '("Code" "Files" "Terminal" "Agenda" "Feeds" "Books" - "Flashcards" "Music" "Email" "IRC" "Telegram" "Slack" "Linear") + "Flashcards" "Music" "Email" "IRC" "Telegram" "Slack" "Linear" "Signal") (mapcar (lambda (l) (nth 3 l)) cj/dashboard--launchers)))) (ert-deftest test-dashboard-row-sizes-cover-all-launchers () @@ -49,19 +50,19 @@ next to Linear on the last navigator row)." ;; --------------------------- navigator rows ---------------------------------- -(ert-deftest test-dashboard-navigator-rows-grouped-4-4-3-2 () - "Normal: navigator derives rows per `cj/dashboard--row-sizes' (4 4 3 2), with -Slack and Linear sharing the last row." +(ert-deftest test-dashboard-navigator-rows-grouped-4-4-3-3 () + "Normal: navigator derives rows per `cj/dashboard--row-sizes' (4 4 3 3), with +Slack, Linear, and Signal sharing the last row." (cl-letf (((symbol-function 'nerd-icons-faicon) (lambda (n &rest _) (concat "I:" n))) ((symbol-function 'nerd-icons-devicon) (lambda (n &rest _) (concat "I:" n))) ((symbol-function 'nerd-icons-mdicon) (lambda (n &rest _) (concat "I:" n))) ((symbol-function 'nerd-icons-octicon) (lambda (n &rest _) (concat "I:" n)))) (let ((rows (cj/dashboard--navigator-rows))) (should (= 4 (length rows))) - (should (equal '(4 4 3 2) (mapcar #'length rows))) + (should (equal '(4 4 3 3) (mapcar #'length rows))) (should (equal '("Code" "Files" "Terminal" "Agenda") (mapcar (lambda (b) (nth 1 b)) (nth 0 rows)))) - (should (equal '("Slack" "Linear") + (should (equal '("Slack" "Linear" "Signal") (mapcar (lambda (b) (nth 1 b)) (nth 3 rows)))) (let ((btn (car (car rows)))) ; (icon label tooltip action nil " " "") (should (string= "I:nf-fa-code" (nth 0 btn))) @@ -95,7 +96,8 @@ Slack and Linear sharing the last row." ((symbol-function 'cj/erc-switch-to-buffer-with-completion) (lambda (&rest _) (push 'irc calls))) ((symbol-function 'cj/slack-start) (lambda (&rest _) (push 'slack calls))) ((symbol-function 'cj/telega) (lambda (&rest _) (push 'tg calls))) - ((symbol-function 'pearl-list-issues) (lambda (&rest _) (push 'linear calls)))) + ((symbol-function 'pearl-list-issues) (lambda (&rest _) (push 'linear calls))) + ((symbol-function 'cj/signel-message) (lambda (&rest _) (push 'signal calls)))) (cj/dashboard--bind-launchers map) (dolist (key test-dash--keys) (call-interactively (keymap-lookup map key))) @@ -104,7 +106,8 @@ Slack and Linear sharing the last row." (should (memq 'linear calls)) (should (memq 'm-toggle calls)) (should (memq 'm-load calls)) - (should (= 14 (length calls)))))) ; 13 keys, Music fires two + (should (memq 'signal calls)) + (should (= 15 (length calls)))))) ; 14 keys, Music fires two (provide 'test-dashboard-config-launchers) ;;; test-dashboard-config-launchers.el ends here |
