mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
testing: support for test tags in search
This also involves creating a suggest enabled input with history, which I modelled off the previous plain text input with history.
This commit is contained in:
@@ -21,7 +21,7 @@ import { InvalidTestItemError, TestItemImpl, TestItemRootImpl } from 'vs/workben
|
||||
import * as Convert from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
import { TestRunProfileKind, TestRunRequest } from 'vs/workbench/api/common/extHostTypes';
|
||||
import { SingleUseTestCollection } from 'vs/workbench/contrib/testing/common/ownedTestCollection';
|
||||
import { AbstractIncrementalTestCollection, CoverageDetails, IFileCoverage, IncrementalChangeCollector, IncrementalTestCollectionItem, InternalTestItem, ISerializedTestResults, ITestItem, ITestTagDisplayInfo, RunTestForControllerRequest, TestResultState, TestRunProfileBitset, TestsDiff } from 'vs/workbench/contrib/testing/common/testCollection';
|
||||
import { AbstractIncrementalTestCollection, CoverageDetails, IFileCoverage, IncrementalChangeCollector, IncrementalTestCollectionItem, InternalTestItem, ISerializedTestResults, ITestItem, RunTestForControllerRequest, TestResultState, TestRunProfileBitset, TestsDiff } from 'vs/workbench/contrib/testing/common/testCollection';
|
||||
import { TestId, TestIdPathParts, TestPosition } from 'vs/workbench/contrib/testing/common/testId';
|
||||
import type * as vscode from 'vscode';
|
||||
|
||||
@@ -176,29 +176,6 @@ export class ExtHostTesting implements ExtHostTestingShape {
|
||||
this.controllers.get(controllerId)?.profiles.get(profileId)?.configureHandler?.();
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
$getTestTags(controllerId: string) {
|
||||
const record = this.controllers.get(controllerId);
|
||||
if (!record) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
const tags = new Map<string, ITestTagDisplayInfo>();
|
||||
for (const profile of record.profiles.values()) {
|
||||
if (profile.tag) {
|
||||
const display = Convert.TestTag.display(controllerId, profile.tag);
|
||||
tags.set(display.id, display);
|
||||
}
|
||||
}
|
||||
|
||||
for (const tag of record.collection.tags()) {
|
||||
const display = Convert.TestTag.display(controllerId, tag);
|
||||
tags.set(display.id, display);
|
||||
}
|
||||
|
||||
return Promise.resolve([...tags.values()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates test results shown to extensions.
|
||||
* @override
|
||||
|
||||
Reference in New Issue
Block a user