mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 21:48:29 +02:00
✨ Add function to validate shape referential integrity
This commit is contained in:
parent
2ca28721f7
commit
730df04970
4 changed files with 348 additions and 19 deletions
|
@ -18,20 +18,20 @@
|
|||
[shape]
|
||||
(t/is (some? (:shape-ref shape)))
|
||||
(t/is (some? (:component-id shape)))
|
||||
(t/is (= (:component-root? shape) true)))
|
||||
(t/is (= (:component-root shape) true)))
|
||||
|
||||
(defn check-instance-subroot
|
||||
[shape]
|
||||
(t/is (some? (:shape-ref shape)))
|
||||
(t/is (some? (:component-id shape)))
|
||||
(t/is (nil? (:component-root? shape))))
|
||||
(t/is (nil? (:component-root shape))))
|
||||
|
||||
(defn check-instance-child
|
||||
[shape]
|
||||
(t/is (some? (:shape-ref shape)))
|
||||
(t/is (nil? (:component-id shape)))
|
||||
(t/is (nil? (:component-file shape)))
|
||||
(t/is (nil? (:component-root? shape))))
|
||||
(t/is (nil? (:component-root shape))))
|
||||
|
||||
(defn check-instance-inner
|
||||
[shape]
|
||||
|
@ -44,7 +44,7 @@
|
|||
(t/is (nil? (:shape-ref shape)))
|
||||
(t/is (nil? (:component-id shape)))
|
||||
(t/is (nil? (:component-file shape)))
|
||||
(t/is (nil? (:component-root? shape)))
|
||||
(t/is (nil? (:component-root shape)))
|
||||
(t/is (nil? (:remote-synced? shape)))
|
||||
(t/is (nil? (:touched shape))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue