-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(exthost/#3268): Part 1 - Fix activation error for dendron extensi…
…on (#3289) __Issue:__ The dendron extension is failing with an activation error: ![image](https://user-images.githubusercontent.com/13532591/111376942-56b95880-865d-11eb-9369-2e21a6378990.png) __Defect:__ The path being supplied to the extension client via InitData is not a valid folder __Fix:__ Fix up the `logsLocation` and `logFile` initialization logic. Add a test case covering the guarantee in the VSCode API docs - that the parent directory must exist and be a valid directory. Related #3268
- Loading branch information
Showing
6 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
open Oni_Model; | ||
open Oni_IntegrationTestLib; | ||
|
||
// This test validates: | ||
// - The 'oni-dev' extension gets activated | ||
// - When typing in an 'oni-dev' buffer, we get some completion results | ||
runTest(~name="ExtHostContextTest", ({dispatch, wait, _}) => { | ||
wait(~timeout=30.0, ~name="Exthost is initialized", (state: State.t) => | ||
Feature_Exthost.isInitialized(state.exthost) | ||
); | ||
|
||
// Wait until the extension is activated | ||
// Give some time for the exthost to start | ||
wait( | ||
~timeout=30.0, | ||
~name="Validate the 'oni-dev' extension gets activated", | ||
(state: State.t) => | ||
List.exists( | ||
id => id == "oni-dev-extension", | ||
state.extensions |> Feature_Extensions.activatedIds, | ||
) | ||
); | ||
|
||
// Kick off an oni-test command that should activate the oni-test-extension: | ||
dispatch( | ||
Actions.Extensions( | ||
Feature_Extensions.Msg.command( | ||
~command="oni-test.exthost.validateLogPathIsDirectory", | ||
~arguments=[], | ||
), | ||
), | ||
); | ||
|
||
// Validate test passes | ||
wait( | ||
~timeout=30.0, | ||
~name="Validate test passes", | ||
(state: State.t) => { | ||
let notifications = Feature_Notification.all(state.notifications); | ||
notifications | ||
|> List.exists((notification: Feature_Notification.notification) => { | ||
notification.message == "PASS" | ||
}); | ||
}, | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters