mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
Add a real playlist (#20)
* Start implementing playlist Done so far: * Creation * Changing playback mode * Changing repeat mode * Add skipping for linear playlists with all repeat modes * Complete implementation for playlist/next-song * Implement all the playlist skipping functionality * Add functions to enqueue songs * Remove start-idx parameter when constructing playlists * Use namespaced keywords only when modifying external data E.g. songs in the queue
This commit is contained in:
parent
2638378064
commit
1888c3023c
11 changed files with 456 additions and 46 deletions
14
test/cljs/airsonic_ui/utils/helpers_test.cljs
Normal file
14
test/cljs/airsonic_ui/utils/helpers_test.cljs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(ns airsonic-ui.utils.helpers-test
|
||||
(:require [cljs.test :refer [deftest testing is]]
|
||||
[airsonic-ui.utils.helpers :as helpers]))
|
||||
|
||||
(deftest find-where
|
||||
(testing "Finds the correct item and index"
|
||||
(is (= [0 1] (helpers/find-where (partial = 1) (range 1 10))))
|
||||
(is (= [2 {:foo true, :bar false}] (helpers/find-where :foo '({}
|
||||
{:foo false
|
||||
:bar true}
|
||||
{:foo true
|
||||
:bar false})))))
|
||||
(testing "Returns nil when nothing is found"
|
||||
(is (nil? (helpers/find-where (partial = 2) (range 2))))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue