File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -372,7 +372,8 @@ redundantImportTests = testGroup "redundant import code actions" [
372372 , testCase " doesn't touch other imports" $ runSession hlsCommand noLiteralCaps " test/testdata/redundantImportTest/" $ do
373373 doc <- openDoc " src/MultipleImports.hs" " haskell"
374374 _ <- waitForDiagnosticsFromSource doc " typecheck"
375- InL cmd : _ <- getAllCodeActions doc
375+ cas <- getAllCodeActions doc
376+ cmd <- liftIO $ inspectCommand cas [" redundant import" ]
376377 executeCommand cmd
377378 _ <- anyRequest
378379 contents <- documentContents doc
@@ -439,11 +440,12 @@ signatureTests = testGroup "missing top level signature code actions" [
439440 doc <- openDoc " TopLevelSignature.hs" " haskell"
440441
441442 _ <- waitForDiagnosticsFromSource doc " typecheck"
442- cas <- map fromAction <$> getAllCodeActions doc
443+ cas <- getAllCodeActions doc
443444
444- liftIO $ " add signature: main :: IO ()" `elem` map ( ^. L. title) cas @? " Contains code action "
445+ liftIO $ expectCodeAction cas [ " add signature: main :: IO ()" ]
445446
446- executeCodeAction $ head cas
447+ replaceWithStuff <- liftIO $ inspectCodeAction cas [" add signature" ]
448+ executeCodeAction replaceWithStuff
447449
448450 contents <- documentContents doc
449451
You can’t perform that action at this time.
0 commit comments