Giter VIP home page Giter VIP logo

chui's People

Contributors

alysbrooks avatar ariela147 avatar barrosfelipe avatar danielcompton avatar henryw374 avatar lucywang000 avatar plexus avatar quesebifurcan avatar rgm avatar roterski avatar socksy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chui's Issues

"Running" and "Pass" are shown forever for async test with errors

When cljs.core.async.interop/<p! is used inside the test results are shown immediately as "Pass" while the test is still in progress. And when an error occurs nothing is updated on UI: "Running" and "Pass" are shown forever

Code example

(deftest some-async-test
  (testing "Some async test should fail"
    (async done
      (cljs.core.async/go
          (cljs.core.async.interop/<p! (returns-promise)) ; error occurs here
          (is (= false true)) ; never executed
          (done))))))

Screenshot 2021-06-21 at 13 54 30

"Run x tests" is disabled on first render

Steps to reproduce

Open the page with tests

Actual result

"Run x tests" is disabled
Screenshot 2021-06-21 at 14 04 45

Expected result

"Run x tests" is enabled on the first render

Workaround

Change input value or click any of search checkboxes

Responsive column size for chui-ui

It's common to have the editor and the browser (with the test tab open) positioned side-by-side on the screen. But the current chui-ui is not responsive, e.g. what about when the browser viewport width is small, it just hides the list of test runs, since most of the time people only care about the last run. Or it could provide a button to manually hide a column.

randomly generated funnel-client/whoami causing problems

Hi,

in the test output the funnel-client/whoami is included as part of a test's id.

it would be useful to be able to set the whoami to a fixed name, so that the test id's are constant over time. this allows tools that show what commit caused a test to fail. stats about flaky tests etc.

Patch for empty `re-find` call in Safari?

For whatever reason, my cljs tests that use (is (match? ,,,)) from nubank/matcher-combinators are blowing up in Safari 15.6.1 with the error TypeError: re-find must match against a string.

image

It looks like the issue is an unexpected nil at https://github.com/lambdaisland/chui/blob/main/modules/chui-core/src/lambdaisland/chui/runner.cljs#L93-L94. My quick logging check on the erroring tests was giving me a value for line-col of "@".

It seems to me this is imperfect and likely to be revisited when conditions change in cljs.test.

Can I propose the following patch? If so, I'll make up a PR. Test line/col reporting remains broken (as it is now). But least it will get us to actionable test failures on Safari:

diff --git a/modules/chui-core/src/lambdaisland/chui/runner.cljs b/modules/chui-core/src/lambdaisland/chui/runner.cljs
index c3d9575..af1c89f 100644
--- a/modules/chui-core/src/lambdaisland/chui/runner.cljs
+++ b/modules/chui-core/src/lambdaisland/chui/runner.cljs
@@ -90,8 +90,8 @@
         (let [line-col (drop (- (count frame) 2) frame)
               file     (str/join ":" (take (- (count frame) 2) frame))]
           {:file   file
-           :line   (js/parseInt (re-find #"\d+" (first line-col)) 10)
-           :column (js/parseInt (re-find #"\d+" (second line-col)) 10)})))))
+           :line   (js/parseInt (re-find #"\d+" (str (first line-col))) 10)
+           :column (js/parseInt (re-find #"\d+" (str (second line-col))) 10)})))))
 
 (defmulti report :type)
 (defmethod report :default [_])

chui-shadow: glogi error using Clojurescript version 1.10.844

After upgrading to Clojurescript version 1.10.844, we started seeing this error when loading the browser runner in chui-shadow:

Failed to load lambdaisland/chui/shadow/browser_runner.cljs TypeError: G__52095.addHandler is not a function
    cljs$core$IFn$_invoke$arity$2 glogi.cljs:134
    cljs$core$IFn$_invoke$arity$2 glogi.cljs:156
    cljs$core$IFn$_invoke$arity$1 glogi.cljs:151
    lambdaisland$glogi$console$install_BANG_ console.cljs:81

Bumping glogi to to 1.0.100 as suggested here lambdaisland/glogi#10 solved the issue for us.

$ clojure -Abrowser-test -Stree

lambdaisland/chui-shadow 1.0.173
  . lambdaisland/chui-ui 1.0.173
    . lambdaisland/chui-core 1.0.173
      X lambdaisland/glogi 1.0.70 :use-top
lambdaisland/glogi 1.0.100

Happy to make a PR to bump the glogi dependency in chui if you think it's a good idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.