File tree Expand file tree Collapse file tree 3 files changed +42
-3
lines changed
src/test/clojure/com/github/clojure_lsp/intellij Expand file tree Collapse file tree 3 files changed +42
-3
lines changed Original file line number Diff line number Diff line change 11(ns com.github.clojure-lsp.intellij.foo-test
22 (:require
3- [clojure.test :refer [deftest is testing]]))
3+ [clojure.test :refer [deftest is]]
4+ [com.github.ericdallo.clj4intellij.app-manager :as app-manager]
5+ [com.github.ericdallo.clj4intellij.test :as clj4intellij.test])
6+ (:import
7+ [com.intellij.openapi.wm WindowManager]))
48
59(set! *warn-on-reflection* true )
610
7- (deftest foo
8- (testing " foo"
11+
12+ (defn get-status-bar-widget [project widget-id]
13+ (let [status-bar (.. (WindowManager/getInstance ) (getStatusBar project))]
14+ (.getWidget status-bar widget-id)))
15+
16+ (deftest foo-test
17+ (let [project-name " clojure.core"
18+ fixture (clj4intellij.test/setup project-name)
19+ deps-file (.createFile fixture " deps.edn" " {}" )
20+ _ (.setTestDataPath fixture " testdata" )
21+ clj-file (.copyFileToProject fixture " foo.clj" )
22+ project (.getProject fixture)]
23+ (is (= project-name (.getName project)))
24+ (is deps-file)
25+
26+ (app-manager/write-command-action
27+ project
28+ (fn [] (.openFileInEditor fixture clj-file)))
29+
30+ (clj4intellij.test/dispatch-all )
31+
32+ @(app-manager/invoke-later!
33+ {:invoke-fn (fn []
34+ (let [widget (get-status-bar-widget project " ClojureLSPStatusBar" )]
35+ (println " Widget:" widget)
36+ (is (some? widget))))})
37+
38+ (.checkResultByFile fixture " foo_expected.clj" )
39+
940 (is false )))
41+
42+
Original file line number Diff line number Diff line change 1+ (ns foo )
2+
3+ (println " Oiii" )
Original file line number Diff line number Diff line change 1+ (ns foo )
2+
3+ (println " Olaa" )
You can’t perform that action at this time.
0 commit comments