This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-08
Channels
- # babashka (9)
- # beginners (43)
- # biff (4)
- # calva (11)
- # cider (6)
- # clerk (1)
- # clj-kondo (4)
- # cljs-dev (6)
- # clojure (82)
- # clojure-berlin (1)
- # clojure-europe (42)
- # clojure-nl (1)
- # clojure-norway (182)
- # clojure-quebec (1)
- # clojure-uk (19)
- # clojurescript (6)
- # datahike (1)
- # emacs (30)
- # fulcro (5)
- # honeysql (6)
- # hyperfiddle (12)
- # lambdaisland (8)
- # malli (11)
- # off-topic (36)
- # pathom (26)
- # pedestal (1)
- # portal (25)
- # practicalli (1)
- # rdf (29)
- # re-frame (17)
- # reitit (1)
- # releases (1)
- # sci (37)
- # shadow-cljs (15)
- # vim (10)
- # xtdb (13)
Hi, I have a component calling (df/load! …)
inside :will-enter / route-deferred
I’m trying to test it with (app/headless-synchronous-app Root settings)
- it works great, but I can’t force it to wait until load! finish.
I would like to have headless end-to-end test - any suggestions how to approach it?
Without digging into the code, I would wildly quess that the load! might be indeed synchronous but that dynamic routing and route-deferred are by nature async. Not sure whether this is true, and if so, how to make route-deferred behave synchronosuly.
You can see here https://github.com/fulcrologic/fulcro/blob/main/src/main/com/fulcrologic/fulcro/routing/dynamic_routing.cljc#L755-L756 (if I found the correct piece of code) that the deferred transaction is instructed to run after render. I don’t know how to make it run immediately …
Thanks Jakub. the same problem is with load! - do you know how to force to make it syncronisly or use it in integration tests?
Is it, though? My memory is not clear now but my impression was that headless-synchronous-app
made it synchronous…