This commit is contained in:
Your Name 2026-10-02 17:44:11 -04:00
parent edca82cd5d
commit 664252e0fc
17 changed files with 373 additions and 112 deletions

View file

@ -52,6 +52,13 @@
(is (nil? (get-in after [:ui :selection])))
(is (nil? (get-in after [:ui :target])))))
(deftest clearing-selection-also-clears-the-creation-target
(let [db {:ui {:selection [:symbol :drawing]
:target {:sid :main :id :lane :path [:lane]}}}
after (ui/selected db nil)]
(is (nil? (get-in after [:ui :selection])))
(is (nil? (get-in after [:ui :target])))))
(deftest an-explicit-lane-is-one-row-of-clips
(let [doc (fixture/document)
rows (timeline/rows doc :main #{})
@ -206,6 +213,14 @@
(is (= address (get-in after [:ui :selection])))
(is (= [address] (get-in after [:ui :selections])))))
(deftest selecting-or-trimming-a-nested-lane-item-does-not-open-its-row
(let [selection [:node :inner :clip [:lane :clip]]
before {:ui {:expanded #{[:already-open]}}}
after (ui/selected before selection)]
(is (= selection (get-in after [:ui :selection])))
(is (= #{[:already-open]} (get-in after [:ui :expanded]))
"disclosure is changed only by the twist control")))
(deftest finishing-a-polygon-opens-no-rows
;; Expansion is the twist triangle's business. Finishing a shape used to open
;; every row down to it, which inside a lane meant tearing its one row into a