From eae2c5bc95ba6d13647409a3f5d61cae53b73c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Thu, 5 Nov 2026 13:26:19 +0100 Subject: [PATCH] :bug: Fix flaky plugin creation parent test (#12858) The svg-with-images case asserted that the stubbed rp/cmd! saw only the URL upload RPC. clear-thumbnail sends :delete-file-object-thumbnails after a 200 ms timer, so on slow CI runners that call was recorded too and the assertion failed. Count only the :create-file-media-object-from-url calls and expect one, so unrelated RPCs no longer break the test. AI-assisted-by: claude-opus-5-5 --- .../test/frontend_tests/plugins/creation_parent_test.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/test/frontend_tests/plugins/creation_parent_test.cljs b/frontend/test/frontend_tests/plugins/creation_parent_test.cljs index 76065ee734..6fe12ebc82 100644 --- a/frontend/test/frontend_tests/plugins/creation_parent_test.cljs +++ b/frontend/test/frontend_tests/plugins/creation_parent_test.cljs @@ -86,7 +86,9 @@ (t/is (not (some #{id} (get-in @store (into path [(thi/id :board) :shapes]))))) (t/is (= 1 (count (get-in @store [:workspace-undo :items]))))) (when (= creation :svg-with-images) - (t/is (= [:create-file-media-object-from-url] (mapv first @uploads)))) + ;; Other RPCs (e.g. the delayed thumbnail cleanup) may land too. + (t/is (= 1 (count (filter #{:create-file-media-object-from-url} + (map first @uploads)))))) (ptk/emit! store dwu/undo) (await (async/wait-for #(nil? (get-in @store (conj path id))) "creation undone")) (t/is (nil? (get-in @store (conj path id))))