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" [
372
372
, testCase " doesn't touch other imports" $ runSession hlsCommand noLiteralCaps " test/testdata/redundantImportTest/" $ do
373
373
doc <- openDoc " src/MultipleImports.hs" " haskell"
374
374
_ <- waitForDiagnosticsFromSource doc " typecheck"
375
- InL cmd : _ <- getAllCodeActions doc
375
+ cas <- getAllCodeActions doc
376
+ cmd <- liftIO $ inspectCommand cas [" redundant import" ]
376
377
executeCommand cmd
377
378
_ <- anyRequest
378
379
contents <- documentContents doc
@@ -439,11 +440,12 @@ signatureTests = testGroup "missing top level signature code actions" [
439
440
doc <- openDoc " TopLevelSignature.hs" " haskell"
440
441
441
442
_ <- waitForDiagnosticsFromSource doc " typecheck"
442
- cas <- map fromAction <$> getAllCodeActions doc
443
+ cas <- getAllCodeActions doc
443
444
444
- liftIO $ " add signature: main :: IO ()" `elem` map ( ^. L. title) cas @? " Contains code action "
445
+ liftIO $ expectCodeAction cas [ " add signature: main :: IO ()" ]
445
446
446
- executeCodeAction $ head cas
447
+ replaceWithStuff <- liftIO $ inspectCodeAction cas [" add signature" ]
448
+ executeCodeAction replaceWithStuff
447
449
448
450
contents <- documentContents doc
449
451
You can’t perform that action at this time.
0 commit comments