hello, I'm playing with the new Fulcro raw things, one thing I notice is that (rc/component-instance? (rc/nc [:foo]))
returns false because hte result of rc/nc
doens't contain fulcro$isComponent true
, should it be there?
actually no. nc
is a component class, not an instance
however, your question caused me to find a bug 😄
Fulcro 3.5.0-RC2 is on clojars. Fixes a bug in nc
where nested queries were not generated correctly.
I am working with Fulcro Template and on the server, there is a https://github.com/fulcrologic/fulcro-template/blob/a169b0ab50c0b390ac5efe24e307d371ec2f2bd3/src/main/app/model/session.clj#L32 , How can I execute it in REPL? I know that on the client side I can simply (comp/transact! SPA [(login {:username "john" :password "mysecurepassword"})]))
. How can I do that on the server side. It looks like on the client side the SPA contains the env, what do I use in place of SPA on the server side.
@timofey.sitnikov I have some parser integrations tests, If you want to look at some examples. https://github.com/hhucn/decide3/blob/master/src/test/decide/models/process_test.clj#L279
(specification "Moderator priviliges"
(let [parser (pathom/build-parser {} *conn*)
parser-with-alex-session (partial parser {:ring/request {:session {:id #uuid"000aa0e2-e4d6-463d-ae7c-46765e13a31b"}}})]
(behavior "Only a moderator can"
(behavior "add new moderators"
(assertions
(parser-with-alex-session
[`(process.mutations/add-moderator
{::process/slug "test-decision"
::user/email "Marc"})])
=check=>
(_/embeds?*
{`process.mutations/add-moderator
{:com.fulcrologic.rad.pathom/errors
{:message "Need moderation role for this operation"}}}))))))
It will take a few days to chew thorough this, but looks interesting. I am just starting to get into testing.