@@ -4,7 +4,7 @@ import Development.IDE.Test
4
4
import Ide.Plugin.Notes (Log , descriptor )
5
5
import System.Directory (canonicalizePath )
6
6
import System.FilePath ((</>) )
7
- import Test.Hls
7
+ import Test.Hls hiding ( waitForBuildQueue )
8
8
9
9
plugin :: PluginTestDescriptor Log
10
10
plugin = mkPluginTestDescriptor descriptor " notes"
@@ -19,15 +19,15 @@ gotoNoteTests :: TestTree
19
19
gotoNoteTests = testGroup " Goto Note Definition"
20
20
[ testCase " single_file" $ runSessionWithServer def plugin testDataDir $ do
21
21
doc <- openDoc " NoteDef.hs" " haskell"
22
- waitForCustomMessage " ghcide/cradle/loaded " ( const $ Just () )
22
+ waitForBuildQueue
23
23
waitForAllProgressDone
24
24
defs <- getDefinitions doc (Position 3 41 )
25
25
liftIO $ do
26
26
fp <- canonicalizePath " NoteDef.hs"
27
27
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 8 9 ) (Position 8 9 ))]))
28
28
, testCase " liberal_format" $ runSessionWithServer def plugin testDataDir $ do
29
29
doc <- openDoc " NoteDef.hs" " haskell"
30
- waitForCustomMessage " ghcide/cradle/loaded " ( const $ Just () )
30
+ waitForBuildQueue
31
31
waitForAllProgressDone
32
32
defs <- getDefinitions doc (Position 5 64 )
33
33
liftIO $ do
@@ -36,22 +36,23 @@ gotoNoteTests = testGroup "Goto Note Definition"
36
36
37
37
, testCase " invalid_note" $ runSessionWithServer def plugin testDataDir $ do
38
38
doc <- openDoc " NoteDef.hs" " haskell"
39
- waitForCustomMessage " ghcide/cradle/loaded " ( const $ Just () )
39
+ waitForBuildQueue
40
40
waitForAllProgressDone
41
41
defs <- getDefinitions doc (Position 6 54 )
42
42
liftIO $ do
43
43
defs @?= InL (Definition (InR [] ))
44
44
45
45
, testCase " no_note" $ runSessionWithServer def plugin testDataDir $ do
46
46
doc <- openDoc " NoteDef.hs" " haskell"
47
- waitForCustomMessage " ghcide/cradle/loaded " ( const $ Just () )
47
+ waitForBuildQueue
48
48
waitForAllProgressDone
49
49
defs <- getDefinitions doc (Position 1 0 )
50
50
liftIO $ defs @?= InL (Definition (InR [] ))
51
51
52
52
, testCase " unopened_file" $ runSessionWithServer def plugin testDataDir $ do
53
53
doc <- openDoc " Other.hs" " haskell"
54
54
waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
55
+ waitForBuildQueue
55
56
waitForAllProgressDone
56
57
defs <- getDefinitions doc (Position 5 20 )
57
58
liftIO $ do
0 commit comments