mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 14:01:38 +01:00
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:  Implemented using a simple provider API.
This commit is contained in:
@@ -15,6 +15,11 @@ declare module 'vscode' {
|
||||
*/
|
||||
export function runTests(run: TestRunRequest, token?: CancellationToken): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Registers a provider that can provide follow-up actions for a test failure.
|
||||
*/
|
||||
export function registerTestFollowupProvider(provider: TestFollowupProvider): Disposable;
|
||||
|
||||
/**
|
||||
* Returns an observer that watches and can request tests.
|
||||
*/
|
||||
@@ -31,6 +36,10 @@ declare module 'vscode' {
|
||||
export const onDidChangeTestResults: Event<void>;
|
||||
}
|
||||
|
||||
export interface TestFollowupProvider {
|
||||
provideFollowup(result: TestRunResult, test: TestResultSnapshot, taskIndex: number, messageIndex: number, token: CancellationToken): ProviderResult<Command[]>;
|
||||
}
|
||||
|
||||
export interface TestObserver {
|
||||
/**
|
||||
* List of tests returned by test provider for files in the workspace.
|
||||
|
||||
Reference in New Issue
Block a user