From cb73ddc3535e76b313b77d3262fb1c6fb56357ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Fri, 10 May 2024 10:28:23 +0200 Subject: [PATCH] :lipstick: Small refactor --- .../common_tests/logic/comp_reset_test.cljc | 24 +++++---------- .../common_tests/logic/comp_touched_test.cljc | 30 +++++++------------ 2 files changed, 18 insertions(+), 36 deletions(-) diff --git a/common/test/common_tests/logic/comp_reset_test.cljc b/common/test/common_tests/logic/comp_reset_test.cljc index fecab3362..3b7551a9f 100644 --- a/common/test/common_tests/logic/comp_reset_test.cljc +++ b/common/test/common_tests/logic/comp_reset_test.cljc @@ -33,12 +33,10 @@ copy-child (ths/get-shape file :copy-child) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy-child)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) @@ -86,12 +84,10 @@ copy-child (ths/get-shape file :copy-child) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy-child)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) @@ -281,12 +277,10 @@ copy2-root (ths/get-shape file :copy2-root) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy2-root)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) @@ -330,12 +324,10 @@ copy2-child (ths/get-shape file :copy2-child) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy2-child)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) diff --git a/common/test/common_tests/logic/comp_touched_test.cljc b/common/test/common_tests/logic/comp_touched_test.cljc index 9293cdb27..1d21eae08 100644 --- a/common/test/common_tests/logic/comp_touched_test.cljc +++ b/common/test/common_tests/logic/comp_touched_test.cljc @@ -31,12 +31,10 @@ copy-child (ths/get-shape file :copy-child) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy-child)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) @@ -73,12 +71,10 @@ copy-child (ths/get-shape file :copy-child) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy-child)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) @@ -234,12 +230,10 @@ copy2-root (ths/get-shape file :copy2-root) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy2-root)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) @@ -272,12 +266,10 @@ copy2-child (ths/get-shape file :copy2-child) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy2-child)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {}) @@ -313,12 +305,10 @@ copy2-child (ths/get-shape file :copy2-child) ;; ==== Action - update-fn (fn [shape] - (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) - changes (cls/generate-update-shapes (pcb/empty-changes nil (:id page)) #{(:id copy2-child)} - update-fn + (fn [shape] + (assoc shape :fills (ths/sample-fills-color :fill-color "#fabada"))) (:objects page) {})