Browse Source

enhance(dev): run individual clj-e2e tests easily from cmdline

Also add more docs on setup and removed conflicting license. Don't think
it was intentional to have these tests as EPL and the rest as AGPL-3
Gabriel Horner 5 months ago
parent
commit
8046549982
3 changed files with 8 additions and 11 deletions
  1. 1 0
      CODEBASE_OVERVIEW.md
  2. 6 11
      clj-e2e/README.md
  3. 1 0
      clj-e2e/deps.edn

+ 1 - 0
CODEBASE_OVERVIEW.md

@@ -62,6 +62,7 @@ This is overview of this repository's most important directories and files.
   - `packags/tldraw/` - Custom fork of tldraw which powers whiteboards
 - `scripts` - Dev scripts
 - `e2e-tests/` - end to end frontend tests
+- `clj-e2e/` - end to end clj frontend tests
 - `android/` -  Android app
 - `ios/` - iOS app
 

+ 6 - 11
clj-e2e/README.md

@@ -4,17 +4,12 @@ e2e tests for Logseq app.
 
 ## Usage
 
-Run the project's tests (they'll fail until you edit them):
+Before running tests, ensure the following:
+* The app's js and css assets are built and located at ../public/static/.
+* Those assets are served on http://localhost:3002/ via `bb serve`.
 
-    $ clojure -T:build test
-
-## License
+Then, run the project's tests:
 
-Copyright © 2025 Tiensonqin
-
-_EPLv1.0 is just the default for projects generated by `clj-new`: you are not_
-_required to open source this project, nor are you required to use EPLv1.0!_
-_Feel free to remove or change the `LICENSE` file and remove or update this_
-_section of the `README.md` file!_
+    $ clojure -T:build test
 
-Distributed under the Eclipse Public License version 1.0.
+If you would like to run individual tests, pass options to the test runner through `clojure -M:test`. For example, add a `^:focus` on a test and then run `clojure -M:test -i focus`.

+ 1 - 0
clj-e2e/deps.edn

@@ -16,6 +16,7 @@
           :main-opts ["-m" "babashka.http-server"]
           :exec-fn babashka.http-server/exec}
   :test {:extra-paths ["test"]
+         :main-opts ["-m" "cognitect.test-runner"]
          :extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
                       io.github.cognitect-labs/test-runner
                       {:git/tag "v0.5.1" :git/sha "dfb30dd"}}}}}