0
Fork 0
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:
Alejandro 2024-05-09 13:20:24 +02:00 committed by GitHub
commit dd62653d4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -40,4 +40,4 @@
(filter #(= id (val %)))
(map key)
(first))
(str "<no-label #" (subs id (- (count id) 6)) ">")))
(str "<no-label #" (subs (str id) (- (count (str id)) 6)) ">")))

View file

@ -17,7 +17,8 @@
[common-tests.helpers.compositions :as tho]
[common-tests.helpers.files :as thf]
[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)
@ -355,7 +356,7 @@
(->> (vals (:objects page))
(filter #(and (= (:name %) (:name original-shape))
(= (:parent-id %) (:parent-id original-shape))
(nil? (thi/label (:id %)))))
(str/starts-with? (thi/label (:id %)) "<no-label")))
first))
(t/deftest test-remove-swap-slot-duplicating-blue1