diff options
| author | Craig Jennings <c@cjennings.net> | 2026-02-26 18:12:59 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-02-26 18:12:59 -0600 |
| commit | 5eb90dbbd18cf9b22d83fe31303fbb09099088ed (patch) | |
| tree | e064dc5609bb9db75c7b3d7b1a24726321a0fc60 /tests/test-video-audio-recording--get-available-sinks.el | |
| parent | ed5e3f61d00a9462801e15179fcceca65315050a (diff) | |
feat(recording): replace icons with text state labels in quick-setup
Replace hard-to-distinguish nerd font icons with clear text labels:
Jabra SPEAK 510 Mono [active - running]
Shure MV7+ Analog Stereo [active - idle]
Ryzen HD Audio Controller [inactive - suspended]
Both mic and sink steps use the same labeling. Devices sorted
running → idle → suspended. Removed mic-active-p and sink-active-p
helpers — state now comes directly from the verbose pactl parsers
via get-available-mics/sinks which return (name description state).
Diffstat (limited to 'tests/test-video-audio-recording--get-available-sinks.el')
| -rw-r--r-- | tests/test-video-audio-recording--get-available-sinks.el | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/test-video-audio-recording--get-available-sinks.el b/tests/test-video-audio-recording--get-available-sinks.el index 540c4f0f..a8e7ad6a 100644 --- a/tests/test-video-audio-recording--get-available-sinks.el +++ b/tests/test-video-audio-recording--get-available-sinks.el @@ -5,6 +5,7 @@ ;; Verifies that available sinks are discovered correctly: ;; - Muted sinks are excluded ;; - Friendly descriptions from PulseAudio are used +;; - PulseAudio state is included ;;; Code: @@ -37,16 +38,25 @@ Each sink is (name description mute state)." ("muted-sink" "Muted Sink" "yes" "SUSPENDED")))))) (let ((sinks (cj/recording--get-available-sinks))) (should (= 1 (length sinks))) - (should (equal "active-sink" (car (car sinks))))))) + (should (equal "active-sink" (nth 0 (car sinks))))))) (ert-deftest test-get-available-sinks-normal-uses-descriptions () - "Test that friendly descriptions are returned as cdr." + "Test that friendly descriptions are returned as second element." (cl-letf (((symbol-function 'shell-command-to-string) (lambda (_cmd) (test-sinks--make-pactl-output '(("raw-sink-name" "Friendly Sink Name" "no" "IDLE")))))) (let ((sinks (cj/recording--get-available-sinks))) - (should (equal "Friendly Sink Name" (cdr (car sinks))))))) + (should (equal "Friendly Sink Name" (nth 1 (car sinks))))))) + +(ert-deftest test-get-available-sinks-normal-includes-state () + "Test that PulseAudio state is returned as third element." + (cl-letf (((symbol-function 'shell-command-to-string) + (lambda (_cmd) + (test-sinks--make-pactl-output + '(("sink-a" "Sink A" "no" "RUNNING")))))) + (let ((sinks (cj/recording--get-available-sinks))) + (should (equal "RUNNING" (nth 2 (car sinks))))))) (ert-deftest test-get-available-sinks-normal-multiple-sinks () "Test that multiple non-muted sinks are returned." |
