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:
Connor Peet
2021-08-12 17:08:43 -07:00
parent 699084fdb4
commit 03504d625a
17 changed files with 545 additions and 251 deletions

View File

@@ -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