|
|
@@ -1,18 +1,36 @@
|
|
|
(ns user
|
|
|
"fns used on repl"
|
|
|
(:require [clojure.test :refer [run-tests run-test]]
|
|
|
- [logseq.e2e.util :as util]
|
|
|
- [wally.main :as w]
|
|
|
- [wally.repl :as repl]
|
|
|
[logseq.e2e.editor-test]
|
|
|
+ [logseq.e2e.fixtures :as fixtures]
|
|
|
[logseq.e2e.outliner-test]
|
|
|
[logseq.e2e.rtc-basic-test]
|
|
|
- [logseq.e2e.fixtures :as fixtures]))
|
|
|
+ [logseq.e2e.multi-tabs-test]
|
|
|
+ [logseq.e2e.util :as util]
|
|
|
+ [logseq.e2e.config :as config]
|
|
|
+ [wally.main :as w]
|
|
|
+ [wally.repl :as repl]))
|
|
|
|
|
|
;; Use port 3001 for local testing
|
|
|
-(reset! fixtures/*port 3001)
|
|
|
+(reset! config/*port 3001)
|
|
|
;; show ui
|
|
|
-(reset! fixtures/*headless false)
|
|
|
+(reset! config/*headless false)
|
|
|
+
|
|
|
+(defn run-editor-test
|
|
|
+ []
|
|
|
+ (future (run-tests 'logseq.e2e.editor-test)))
|
|
|
+
|
|
|
+(defn run-outliner-test
|
|
|
+ []
|
|
|
+ (future (run-tests 'logseq.e2e.outliner-test)))
|
|
|
+
|
|
|
+(defn run-rtc-basic-test
|
|
|
+ []
|
|
|
+ (future (run-tests 'logseq.e2e.rtc-basic-test)))
|
|
|
+
|
|
|
+(defn run-multi-tabs-test
|
|
|
+ []
|
|
|
+ (future (run-tests 'logseq.e2e.multi-tabs-test)))
|
|
|
|
|
|
(comment
|
|
|
|
|
|
@@ -21,20 +39,13 @@
|
|
|
repl/pause
|
|
|
{:headless false}))
|
|
|
|
|
|
-;; You can put `(repl/pause)` in any test to pause the tests,
|
|
|
+ ;; You can put `(repl/pause)` in any test to pause the tests,
|
|
|
;; this allows us to continue experimenting with the current page.
|
|
|
(repl/pause)
|
|
|
|
|
|
;; To resume the tests, close the page/context/browser
|
|
|
(repl/resume)
|
|
|
|
|
|
- ;; Run all the tests in specific ns with `future` to not block repl
|
|
|
- (future (run-tests 'logseq.e2e.editor-test))
|
|
|
-
|
|
|
- (future (run-tests 'logseq.e2e.outliner-test))
|
|
|
-
|
|
|
- (future (run-tests 'logseq.e2e.rtc-basic-test))
|
|
|
-
|
|
|
;; Run specific test
|
|
|
(future (run-test logseq.e2e.editor-test/commands-test))
|
|
|
|