mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 22:10:34 +00:00
🐛 Fix the per-change selection toggle and its hanging test
The toggle flip default was inverted: with an empty selection the first toggle left it empty instead of adding the change, and an excluded change could never be deselected, so the row checkbox was a no-op in both directions; the group paths that pass include? are unchanged. The refetch test deferred body never called inner-done, so with-mocks neither restored the mocks nor completed the test, and the whole suite hung on it; that is why the suite could not finish. AI-assisted-by: glm-5.3-flash Signed-off-by: Alvaro Tejero Cantero <alvorithm@teje.ro>
This commit is contained in:
parent
fe60e1a772
commit
e41e96abb2
@ -412,7 +412,7 @@
|
||||
(let [excluded (or excluded #{})
|
||||
include? (if (some? include?)
|
||||
include?
|
||||
(not (every? excluded change-keys)))]
|
||||
(every? excluded change-keys))]
|
||||
(if include?
|
||||
(apply disj excluded change-keys)
|
||||
(into excluded change-keys)))))))))
|
||||
|
||||
@ -187,7 +187,8 @@
|
||||
(t/testing "the other direction starts the selection over"
|
||||
(ptk/emit! store (dwb/fetch-branch-diff (:id branch) :main->branch))
|
||||
(t/is (= #{} (get-in @store [:workspace-branch-diff :excluded]))))
|
||||
(rx/dispose! store)))
|
||||
(rx/dispose! store))
|
||||
(done'))
|
||||
done))))
|
||||
|
||||
(t/deftest the-selection-travels-with-the-merge-and-update-calls
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user