theia icon indicating copy to clipboard operation
theia copied to clipboard

[vscode] Add support for TestRunProfile onDidChangeProfile event

Open rschnekenbu opened this issue 1 year ago • 0 comments

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.

  1. When extension is installed, the "Test API: Run all tests" command can be invoked
  2. It will create 2 run profiles, and some tests. A couple of message windows will pop up.
  3. Then it is possible to switch between default profiles using the "Select Default Test Profiles..." in the command palette.
  4. 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.

testing-default-profile

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

Reminder for reviewers

rschnekenbu avatar Feb 14 '24 14:02 rschnekenbu