Skip to content

Commit

Permalink
Merge pull request #525 from isovector/tactics-diagnostics
Browse files Browse the repository at this point in the history
Wait for diagnostics in tactics tests to try to workaround circleci failing ones
  • Loading branch information
jneira authored Oct 21, 2020
2 parents 9a55a8d + e207023 commit f766476
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/functional/Tactic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ mkTest name fp line col ts =
testCase name $ do
runSession hlsCommand fullCaps tacticPath $ do
doc <- openDoc fp "haskell"
_ <- waitForDiagnostics
actions <- getCodeActions doc $ pointRange line col
let titles = mapMaybe codeActionTitle actions
for_ ts $ \(f, tc, var) -> do
Expand All @@ -136,6 +137,7 @@ goldenTest input line col tc occ =
testCase (input <> " (golden)") $ do
runSession hlsCommand fullCaps tacticPath $ do
doc <- openDoc input "haskell"
_ <- waitForDiagnostics
actions <- getCodeActions doc $ pointRange line col
Just (CACodeAction (CodeAction {_command = Just c}))
<- pure $ find ((== Just (tacticTitle tc occ)) . codeActionTitle) actions
Expand Down

0 comments on commit f766476

Please sign in to comment.