@@ -19,28 +19,33 @@ 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
- _ <- waitForAllProgressDone
22
+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
23
+ waitForAllProgressDone
23
24
defs <- getDefinitions doc (Position 3 41 )
24
25
liftIO $ do
25
26
fp <- canonicalizePath " NoteDef.hs"
26
27
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 8 9 ) (Position 8 9 ))]))
27
28
, testCase " liberal_format" $ runSessionWithServer def plugin testDataDir $ do
28
29
doc <- openDoc " NoteDef.hs" " haskell"
29
- _ <- waitForAllProgressDone
30
+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
31
+ waitForAllProgressDone
30
32
defs <- getDefinitions doc (Position 5 64 )
31
33
liftIO $ do
32
34
fp <- canonicalizePath " NoteDef.hs"
33
35
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 18 11 ) (Position 18 11 ))]))
34
36
35
37
, testCase " invalid_note" $ runSessionWithServer def plugin testDataDir $ do
36
38
doc <- openDoc " NoteDef.hs" " haskell"
37
- _ <- waitForAllProgressDone
39
+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
40
+ waitForAllProgressDone
38
41
defs <- getDefinitions doc (Position 6 54 )
39
42
liftIO $ do
40
43
defs @?= InL (Definition (InR [] ))
41
44
42
45
, testCase " no_note" $ runSessionWithServer def plugin testDataDir $ do
43
46
doc <- openDoc " NoteDef.hs" " haskell"
47
+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
48
+ waitForAllProgressDone
44
49
defs <- getDefinitions doc (Position 1 0 )
45
50
liftIO $ defs @?= InL (Definition (InR [] ))
46
51
0 commit comments