mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 06:58:58 -05:00
Merge pull request #4571 from penpot/palba-fix-tests
🐛 Fix tests for remove swap slots
This commit is contained in:
commit
dd62653d4b
2 changed files with 5 additions and 4 deletions
|
@ -40,4 +40,4 @@
|
||||||
(filter #(= id (val %)))
|
(filter #(= id (val %)))
|
||||||
(map key)
|
(map key)
|
||||||
(first))
|
(first))
|
||||||
(str "<no-label #" (subs id (- (count id) 6)) ">")))
|
(str "<no-label #" (subs (str id) (- (count (str id)) 6)) ">")))
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
[common-tests.helpers.compositions :as tho]
|
[common-tests.helpers.compositions :as tho]
|
||||||
[common-tests.helpers.files :as thf]
|
[common-tests.helpers.files :as thf]
|
||||||
[common-tests.helpers.ids-map :as thi]
|
[common-tests.helpers.ids-map :as thi]
|
||||||
[common-tests.helpers.shapes :as ths]))
|
[common-tests.helpers.shapes :as ths]
|
||||||
|
[cuerdas.core :as str]))
|
||||||
|
|
||||||
(t/use-fixtures :each thi/test-fixture)
|
(t/use-fixtures :each thi/test-fixture)
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
;; :red-copy-green [:name Frame1] @--> :frame-red
|
;; :red-copy-green [:name Frame1] @--> :frame-red
|
||||||
;; {:frame-b1} [:name Frame1] # [Component :b1]
|
;; {:frame-b1} [:name Frame1] # [Component :b1]
|
||||||
;; :blue1 [:name Frame1, :swap-slot-label :red-copy] @--> :frame-blue
|
;; :blue1 [:name Frame1, :swap-slot-label :red-copy] @--> :frame-blue
|
||||||
;; :frame-yellow [:name Frame1]
|
;; :frame-yellow [:name Frame1]
|
||||||
;; :green-copy [:name Frame1] @--> :frame-green
|
;; :green-copy [:name Frame1] @--> :frame-green
|
||||||
;; :blue-copy-in-green-copy [:name Frame1, :swap-slot-label :red-copy-green] @--> :frame-blue
|
;; :blue-copy-in-green-copy [:name Frame1, :swap-slot-label :red-copy-green] @--> :frame-blue
|
||||||
;; {:frame-b2} [:name Frame1] # [Component :b2]
|
;; {:frame-b2} [:name Frame1] # [Component :b2]
|
||||||
|
@ -355,7 +356,7 @@
|
||||||
(->> (vals (:objects page))
|
(->> (vals (:objects page))
|
||||||
(filter #(and (= (:name %) (:name original-shape))
|
(filter #(and (= (:name %) (:name original-shape))
|
||||||
(= (:parent-id %) (:parent-id original-shape))
|
(= (:parent-id %) (:parent-id original-shape))
|
||||||
(nil? (thi/label (:id %)))))
|
(str/starts-with? (thi/label (:id %)) "<no-label")))
|
||||||
first))
|
first))
|
||||||
|
|
||||||
(t/deftest test-remove-swap-slot-duplicating-blue1
|
(t/deftest test-remove-swap-slot-duplicating-blue1
|
||||||
|
|
Loading…
Add table
Reference in a new issue