@@ -19,28 +19,33 @@ gotoNoteTests :: TestTree
1919gotoNoteTests = testGroup " Goto Note Definition"
2020 [ testCase " single_file" $ runSessionWithServer def plugin testDataDir $ do
2121 doc <- openDoc " NoteDef.hs" " haskell"
22- _ <- waitForAllProgressDone
22+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
23+ waitForAllProgressDone
2324 defs <- getDefinitions doc (Position 3 41 )
2425 liftIO $ do
2526 fp <- canonicalizePath " NoteDef.hs"
2627 defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 8 9 ) (Position 8 9 ))]))
2728 , testCase " liberal_format" $ runSessionWithServer def plugin testDataDir $ do
2829 doc <- openDoc " NoteDef.hs" " haskell"
29- _ <- waitForAllProgressDone
30+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
31+ waitForAllProgressDone
3032 defs <- getDefinitions doc (Position 5 64 )
3133 liftIO $ do
3234 fp <- canonicalizePath " NoteDef.hs"
3335 defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 18 11 ) (Position 18 11 ))]))
3436
3537 , testCase " invalid_note" $ runSessionWithServer def plugin testDataDir $ do
3638 doc <- openDoc " NoteDef.hs" " haskell"
37- _ <- waitForAllProgressDone
39+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
40+ waitForAllProgressDone
3841 defs <- getDefinitions doc (Position 6 54 )
3942 liftIO $ do
4043 defs @?= InL (Definition (InR [] ))
4144
4245 , testCase " no_note" $ runSessionWithServer def plugin testDataDir $ do
4346 doc <- openDoc " NoteDef.hs" " haskell"
47+ waitForCustomMessage " ghcide/cradle/loaded" (const $ Just () )
48+ waitForAllProgressDone
4449 defs <- getDefinitions doc (Position 1 0 )
4550 liftIO $ defs @?= InL (Definition (InR [] ))
4651
0 commit comments