This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-06
Channels
- # beginners (137)
- # cider (60)
- # cljs-dev (52)
- # cljsrn (5)
- # clojars (15)
- # clojure (156)
- # clojure-brasil (1)
- # clojure-dev (7)
- # clojure-italy (13)
- # clojure-serbia (2)
- # clojure-spec (12)
- # clojure-uk (76)
- # clojurescript (129)
- # core-async (27)
- # core-typed (1)
- # cursive (3)
- # datomic (105)
- # devcards (39)
- # emacs (10)
- # figwheel (1)
- # fulcro (68)
- # graphql (6)
- # juxt (3)
- # klipse (85)
- # lein-figwheel (47)
- # leiningen (3)
- # midje (1)
- # mount (26)
- # off-topic (71)
- # om (4)
- # overtone (4)
- # parinfer (3)
- # pedestal (4)
- # portkey (37)
- # re-frame (37)
- # reagent (13)
- # reitit (3)
- # ring (1)
- # rum (5)
- # shadow-cljs (191)
- # spacemacs (35)
- # specter (26)
- # tools-deps (45)
- # vim (20)
hey guys, i wanted to get some opinions on a good way to run some functional tests on a re_frame app. i already have what I would call “smoke” tests that use a webdriver api to click through a couple major components, testing a few happy paths e2e across live apis. what i’m looking for next is ui-focused tests that 1) still use a webdriver-style click-through/interaction-via-browser, but doesn’t talk to real APIs and instead only receives precanned json responses
this in theory is really simple, just replace the :http
cofx i have registered, and mock out a bunch of precanned responses instead of live network requests. the problem is at my implementation level … what’s a good strategy for running a testing suite from clj? the best i can come up with is pre-building the app under a different target, where this build is a copy of my “live build” except the cofx that touch apis are replaced by stubs. i really wish I could just use with-redefs [my.existing/http mock-http]
but obv that doesnt work because you can’t mix clj/cljs runtimes 😞
What is the best practice SPA with re-frame to see on github? I am talking about something real and bigger than todo challenge.
@U0WL6FA77 there are a few of these out there: * One based on the “RealWorld” spec for this sort of example problem https://github.com/polymeris/re-frame-realword-example-app * Another I’ve seen mentioned a few times before https://github.com/yogthos/memory-hole
I won’t speak to whether or not they are “good” or not, just that they have been used before in cases like what you’re looking for
mostly I want to see code after 1-2 years of maintenance, so it needs to be real application, not example code
in my re-frame app I had namespaced subscriptions and events. now I’ve removed the namespaced ones and replaced with normal ones (with the same names of course. I just changed ::
to :
) and now none of my subscriptions and event handlers work. could there be a reason for this?
looking for some advice. if you’re building a simple client side re-frame app, but you need a little proxy microservice to front some api calls; is it a common pattern to make that part of the same repository? local dev would be firing up that ring app, and then also firing up a separate cljs+figwheel repl to run the front end?
@chadhs better to have the separate server for the application and launch it seperately from figwheel
@bhauman so in my simple example I’d be better off with a repo for the proxy service and one for my client app
@chadhs first do you need a proxy server or can you connect to it directly from your app?
second a proxy server at its simplest is just a clojure namespace that defines a ring-endpoint / middleware
I’m running this locally on a raspberry pie so I wouldn’t really be leaking an API key but I understand why they don’t allow Cors