theia
theia copied to clipboard
[vscode] Add support for TestRunProfile onDidChangeProfile event
What it does
This pull request add the support of API introduced with VS Code 1.86 on TestRunProfile, the onDidChangeDefault event. It also adds the capability of changing default profile for a given test controller and a given kind of test run. The isDefault value is now updated as soon as the command "Select Default Test Profiles..." is used in the tool.
Fixes #13354
Contributed on behalf of STMicroelectronics
How to test
Install the following extension, mainly inspired from https://github.com/KevinClapperton/Test-API-functional-test
This extension will add a test controller and a command to create a test run profile, install a bunch of test and create a test run.
- When extension is installed, the "Test API: Run all tests" command can be invoked
- It will create 2 run profiles, and some tests. A couple of message windows will pop up.
- Then it is possible to switch between default profiles using the "Select Default Test Profiles..." in the command palette.
- The app should notify that isDefault has changed for the profiles impacted by the choice, i.e. the profiles from same controller that have the right kind as selected in the first pick dialog. Only one profile per controller and kind can be activated at once, on the contrary of VS code implementation. This latter implementation is a bug IMO, as only one profile will be chosen to run the tests, so having several default profiles is not relevant.
Note: the set isDefault
value is not kept in settings, so user may need to configure it each time the app is started. This behavior is similar to the one on VS Code.
Follow-ups
There are no follow ups known currently.
Review checklist
- [x] As an author, I have thoroughly tested my changes and carefully followed the review guidelines
Reminder for reviewers
- [ ] As a reviewer, I agree to behave in accordance with the review guidelines