mirror of
https://github.com/penpot/penpot.git
synced 2026-11-06 01:50:39 +00:00
🐛 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
This commit is contained in:
parent
e42bae34cf
commit
eae2c5bc95
@ -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))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user