mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 12:58:24 +02:00
♻️ Create hidden theme on token lib creation (#5991)
* ♻️ Create hidden theme on token lib creation * 📎 Fix tests * 🎉 Add migration * 🎉 Remove comment * ♻️ Remove unused changes * 📎 Remove unused fn
This commit is contained in:
parent
97fb1e00c2
commit
e729e85c42
8 changed files with 70 additions and 93 deletions
|
@ -32,7 +32,6 @@
|
|||
(t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib)))))
|
||||
|
||||
(t/testing "toggling an inactive set will switch to hidden theme without user sets"
|
||||
|
@ -51,7 +50,6 @@
|
|||
(t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib)))))
|
||||
|
||||
(t/testing "toggling an set with hidden theme already active will toggle set in hidden theme"
|
||||
|
@ -68,10 +66,7 @@
|
|||
undo-lib (tht/get-tokens-lib undo)]
|
||||
(t/is (= (ctob/get-active-theme-paths redo-lib) (ctob/get-active-theme-paths undo-lib)))
|
||||
|
||||
(t/is (= #{"foo/bar"} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (some? (ctob/get-hidden-theme undo-lib))))))
|
||||
(t/is (= #{"foo/bar"} (:sets (ctob/get-hidden-theme redo-lib)))))))
|
||||
|
||||
(t/deftest set-token-test
|
||||
(t/testing "delete token"
|
||||
|
@ -155,7 +150,6 @@
|
|||
(t/is (= #{"foo/bar/baz" "foo/bar/baz/baz-child"} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib)))))
|
||||
|
||||
(t/testing "toggling set group with partially active sets inside will deactivate all child sets"
|
||||
|
@ -177,7 +171,6 @@
|
|||
(t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib)))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib))))))
|
||||
|
||||
(t/deftest generate-move-token-set-test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue