testing: exploratory UI for followup actions

This adds an API that extensions can use to contribute 'followup'
actions around test messages. Here just a dummy hello world using
copilot, but extensions could have any action here, such as actions to
update snapshots if a test failed:

![](https://memes.peet.io/img/24-05-c1f3e073-a2da-4f16-a033-c8f7e5cd4864.png)

Implemented using a simple provider API.
This commit is contained in:
Connor Peet
2024-05-21 16:09:08 -07:00
parent 71e25d9b3c
commit e1dfc911ce
12 changed files with 315 additions and 34 deletions

View File

@@ -453,6 +453,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension, 'testObserver');
return extHostTesting.runTests(provider);
},
registerTestFollowupProvider(provider) {
checkProposedApiEnabled(extension, 'testObserver');
return extHostTesting.registerTestFollowupProvider(provider);
},
get onDidChangeTestResults() {
checkProposedApiEnabled(extension, 'testObserver');
return _asExtensionEvent(extHostTesting.onResultsChanged);