Fix indent

This commit is contained in:
Florian Schroedl 2024-07-22 11:30:27 +02:00
parent 359ec592fb
commit 91033d6dea

View file

@ -27,7 +27,7 @@
:type :border-radius}))) :type :border-radius})))
(t/deftest test-apply-token (t/deftest test-apply-token
(t/testing "applying a token twice with the same attributes will override") (t/testing "applying a token twice with the same attributes will override"
(t/async (t/async
done done
(let [file (setup-file) (let [file (setup-file)
@ -51,10 +51,10 @@
(t/is (= (:rx (:applied-tokens rect-1')) (:id token-2'))) (t/is (= (:rx (:applied-tokens rect-1')) (:id token-2')))
(t/is (= (:ry (:applied-tokens rect-1')) (:id token-2'))) (t/is (= (:ry (:applied-tokens rect-1')) (:id token-2')))
(t/is (= (:rx rect-1') 24)) (t/is (= (:rx rect-1') 24))
(t/is (= (:ry rect-1') 24)))))))) (t/is (= (:ry rect-1') 24)))))))))
(t/deftest test-apply-border-radius (t/deftest test-apply-border-radius
(t/testing "applies radius token and updates the shapes radius") (t/testing "applies radius token and updates the shapes radius"
(t/async (t/async
done done
(let [file (setup-file) (let [file (setup-file)
@ -74,10 +74,10 @@
(t/is (= (:rx (:applied-tokens rect-1')) (:id token-2'))) (t/is (= (:rx (:applied-tokens rect-1')) (:id token-2')))
(t/is (= (:ry (:applied-tokens rect-1')) (:id token-2'))) (t/is (= (:ry (:applied-tokens rect-1')) (:id token-2')))
(t/is (= (:rx rect-1') 24)) (t/is (= (:rx rect-1') 24))
(t/is (= (:ry rect-1') 24)))))))) (t/is (= (:ry rect-1') 24)))))))))
(t/deftest test-apply-dimensions (t/deftest test-apply-dimensions
(t/testing "applies dimensions token and updates the shapes width and height") (t/testing "applies dimensions token and updates the shapes width and height"
(t/async (t/async
done done
(let [file (-> (setup-file) (let [file (-> (setup-file)
@ -100,10 +100,10 @@
(t/is (= (:width (:applied-tokens rect-1')) (:id token-target'))) (t/is (= (:width (:applied-tokens rect-1')) (:id token-target')))
(t/is (= (:height (:applied-tokens rect-1')) (:id token-target'))) (t/is (= (:height (:applied-tokens rect-1')) (:id token-target')))
(t/is (= (:width rect-1') 100)) (t/is (= (:width rect-1') 100))
(t/is (= (:height rect-1') 100)))))))) (t/is (= (:height rect-1') 100)))))))))
(t/deftest test-apply-sizing (t/deftest test-apply-sizing
(t/testing "applies sizing token and updates the shapes width and height") (t/testing "applies sizing token and updates the shapes width and height"
(t/async (t/async
done done
(let [file (-> (setup-file) (let [file (-> (setup-file)
@ -126,10 +126,10 @@
(t/is (= (:width (:applied-tokens rect-1')) (:id token-target'))) (t/is (= (:width (:applied-tokens rect-1')) (:id token-target')))
(t/is (= (:height (:applied-tokens rect-1')) (:id token-target'))) (t/is (= (:height (:applied-tokens rect-1')) (:id token-target')))
(t/is (= (:width rect-1') 100)) (t/is (= (:width rect-1') 100))
(t/is (= (:height rect-1') 100)))))))) (t/is (= (:height rect-1') 100)))))))))
(t/deftest test-apply-opacity (t/deftest test-apply-opacity
(t/testing "applies opacity token and updates the shapes opacity") (t/testing "applies opacity token and updates the shapes opacity"
(t/async (t/async
done done
(let [file (-> (setup-file) (let [file (-> (setup-file)
@ -151,10 +151,10 @@
(t/is (some? (:applied-tokens rect-1'))) (t/is (some? (:applied-tokens rect-1')))
(t/is (= (:opacity (:applied-tokens rect-1')) (:id token-target'))) (t/is (= (:opacity (:applied-tokens rect-1')) (:id token-target')))
;; TODO Fix opacity shape update not working? ;; TODO Fix opacity shape update not working?
#_(t/is (= (:opacity rect-1') 0.5)))))))) #_(t/is (= (:opacity rect-1') 0.5)))))))))
(t/deftest test-apply-rotation (t/deftest test-apply-rotation
(t/testing "applies rotation token and updates the shapes rotation") (t/testing "applies rotation token and updates the shapes rotation"
(t/async (t/async
done done
(let [file (-> (setup-file) (let [file (-> (setup-file)
@ -175,7 +175,7 @@
rect-1' (cths/get-shape file' :rect-1)] rect-1' (cths/get-shape file' :rect-1)]
(t/is (some? (:applied-tokens rect-1'))) (t/is (some? (:applied-tokens rect-1')))
(t/is (= (:rotation (:applied-tokens rect-1')) (:id token-target'))) (t/is (= (:rotation (:applied-tokens rect-1')) (:id token-target')))
(t/is (= (:rotation rect-1') 120)))))))) (t/is (= (:rotation rect-1') 120)))))))))
(t/deftest test-toggle-token-none (t/deftest test-toggle-token-none
(t/testing "should apply token to all selected items, where no item has the token applied" (t/testing "should apply token to all selected items, where no item has the token applied"