0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐛 Fix tests

This commit is contained in:
Andrey Antukh 2024-11-18 18:06:42 +01:00
parent 7c0142432e
commit 3addc4ae42
2 changed files with 7 additions and 6 deletions

View file

@ -10,7 +10,6 @@
[app.common.schema :as sm] [app.common.schema :as sm]
[app.common.types.page :as ctp] [app.common.types.page :as ctp]
[app.common.types.plugins :as ctpg] [app.common.types.plugins :as ctpg]
[app.common.uuid :as uuid]
[cuerdas.core :as str])) [cuerdas.core :as str]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -236,7 +235,7 @@
(defn group->swap-slot (defn group->swap-slot
[group] [group]
(uuid/uuid (subs (name group) 10))) (parse-uuid (subs (name group) 10)))
(defn get-swap-slot (defn get-swap-slot
"If the shape has a :touched group in the form :swap-slot-<uuid>, get the id." "If the shape has a :touched group in the form :swap-slot-<uuid>, get the id."
@ -326,7 +325,7 @@
(defn valid-touched-group? (defn valid-touched-group?
[group] [group]
(try (try
(or ((all-touched-groups) group) (or (contains? (all-touched-groups) group)
(and (swap-slot? group) (and (swap-slot? group)
(some? (group->swap-slot group)))) (some? (group->swap-slot group))))
(catch #?(:clj Throwable :cljs :default) _ (catch #?(:clj Throwable :cljs :default) _

View file

@ -40,7 +40,8 @@
[common-tests.types.shape-decode-encode-test] [common-tests.types.shape-decode-encode-test]
[common-tests.types.tokens-lib-test] [common-tests.types.tokens-lib-test]
[common-tests.types.types-component-test] [common-tests.types.types-component-test]
[common-tests.types.types-libraries-test])) [common-tests.types.types-libraries-test]
[common-tests.uuid-test]))
#?(:cljs (enable-console-print!)) #?(:cljs (enable-console-print!))
@ -80,10 +81,11 @@
'common-tests.svg-path-test 'common-tests.svg-path-test
'common-tests.svg-test 'common-tests.svg-test
'common-tests.text-test 'common-tests.text-test
'common-tests.time-test
'common-tests.types-modifiers-test 'common-tests.types-modifiers-test
'common-tests.types-shape-interactions-test 'common-tests.types-shape-interactions-test
'common-tests.types.shape-decode-encode-test 'common-tests.types.shape-decode-encode-test
'common-tests.types.tokens-lib-test
'common-tests.types.types-component-test 'common-tests.types.types-component-test
'common-tests.types.types-libraries-test 'common-tests.types.types-libraries-test
'common-tests.types.tokens-lib-test 'common-tests.uuid-test))
'common-tests.time-test))