diff --git a/common/src/app/common/test_helpers/composable/core.cljc b/common/src/app/common/test_helpers/composable/core.cljc index ad99ed74a5..83303125de 100644 --- a/common/src/app/common/test_helpers/composable/core.cljc +++ b/common/src/app/common/test_helpers/composable/core.cljc @@ -251,7 +251,7 @@ (when (nil? shape) (let [present (->> (vals (:objects page)) (map (comp thi/label :id)) - (sort) + (sort-by str) (vec))] (throw (ex-info (str "Unbound shape name: " (pr-str name) ". Shapes present in current page: " (pr-str present)) diff --git a/common/test/common_tests/logic/composable_runner_test.cljc b/common/test/common_tests/logic/composable_runner_test.cljc index f035c58420..d87fa124a0 100644 --- a/common/test/common_tests/logic/composable_runner_test.cljc +++ b/common/test/common_tests/logic/composable_runner_test.cljc @@ -582,3 +582,10 @@ result (n/applied-result duplicate (tm/file before) (tm/file after)) new-head (tm/shape-by-id after (:new-head result))] (t/is (= ((n/main-head-of "a") before) (:parent-id new-head))))) + +(t/deftest missing-shape-diagnostics-accept-mixed-label-types + (let [situation (setup/simple-component-with-labeled-copy) + error (try (tm/resolve-shape situation :missing) + (catch #?(:clj Exception :cljs js/Error) error error))] + (t/is (= ::tm/unbound-shape-name (:type (ex-data error)))) + (t/is (some #{:copy-child} (:present (ex-data error))))))