aboutsummaryrefslogtreecommitdiff
path: root/tests/test-music-config--playlist-side.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-09 18:02:14 -0500
committerCraig Jennings <c@cjennings.net>2026-07-09 18:02:14 -0500
commit23374dbaf6648af773c0a6fee5514c364e24de31 (patch)
treef5bb931527b25d04fe074aabe65d4f151b51a857 /tests/test-music-config--playlist-side.el
parent0f3d168cbf97886ed5ddc187ca66d42ce3a50936 (diff)
downloaddotemacs-23374dbaf6648af773c0a6fee5514c364e24de31.tar.gz
dotemacs-23374dbaf6648af773c0a6fee5514c364e24de31.zip
feat(music): always dock the playlist at the bottom
The F10 playlist docked as a right-side column when the frame was wide enough, splitting the frame three ways. That's annoying and often unexpected, so the frame's shape no longer decides where the playlist goes. I deleted the chooser (cj/--music-playlist-side) and the right-dock width knobs rather than leaving them wired to nothing, and a test asserts they're gone. cj/preferred-dock-direction stays, since ai-term and eat still dock by frame shape. The old side-chooser test is replaced by one that stubs cj/side-window-display and asserts what the toggle asks for, so it runs headless.
Diffstat (limited to 'tests/test-music-config--playlist-side.el')
-rw-r--r--tests/test-music-config--playlist-side.el45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/test-music-config--playlist-side.el b/tests/test-music-config--playlist-side.el
deleted file mode 100644
index f4969469..00000000
--- a/tests/test-music-config--playlist-side.el
+++ /dev/null
@@ -1,45 +0,0 @@
-;;; test-music-config--playlist-side.el --- Tests for the F10 dock-side helper -*- lexical-binding: t; -*-
-
-;;; Commentary:
-;; `cj/--music-playlist-side' maps the shared dock rule's verdict to a
-;; `display-buffer-in-side-window' side: `right' stays `right', anything
-;; else becomes `bottom'. The decision itself lives in
-;; `cj/preferred-dock-direction' (tested in test-cj-window-geometry-lib.el);
-;; here we stub it (an ordinary defun -- safe to `cl-letf', unlike the
-;; frame-* subrs) to prove the mapping and that the width fraction is
-;; passed through.
-
-;;; Code:
-
-(require 'ert)
-(require 'cl-lib)
-
-(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
-(require 'music-config)
-
-(ert-deftest test-music-config--playlist-side-right-verdict-is-right ()
- "Normal: a `right' verdict from the dock rule docks the playlist right."
- (cl-letf (((symbol-function 'cj/preferred-dock-direction)
- (lambda (&rest _) 'right)))
- (should (eq (cj/--music-playlist-side) 'right))))
-
-(ert-deftest test-music-config--playlist-side-below-verdict-is-bottom ()
- "Normal: a `below' verdict maps to the `bottom' side window."
- (cl-letf (((symbol-function 'cj/preferred-dock-direction)
- (lambda (&rest _) 'below)))
- (should (eq (cj/--music-playlist-side) 'bottom))))
-
-(ert-deftest test-music-config--playlist-side-passes-width-fraction ()
- "Normal: the playlist's width fraction reaches the dock rule."
- (let ((cj/music-playlist-window-width 0.4)
- captured)
- (cl-letf (((symbol-function 'cj/preferred-dock-direction)
- (lambda (cols frac &rest _)
- (setq captured (list cols frac))
- 'below)))
- (cj/--music-playlist-side)
- (should (= (nth 1 captured) 0.4))
- (should (integerp (nth 0 captured))))))
-
-(provide 'test-music-config--playlist-side)
-;;; test-music-config--playlist-side.el ends here