mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
testing: properly apply group default default profiles (#208476)
Fixes #206306
This commit is contained in:
parent
c1b0fbbe22
commit
32c524af96
|
@ -19,7 +19,7 @@ import { ITestProfileService } from 'vs/workbench/contrib/testing/common/testPro
|
|||
import { LiveTestResult } from 'vs/workbench/contrib/testing/common/testResult';
|
||||
import { ITestResultService } from 'vs/workbench/contrib/testing/common/testResultService';
|
||||
import { IMainThreadTestController, ITestRootProvider, ITestService } from 'vs/workbench/contrib/testing/common/testService';
|
||||
import { CoverageDetails, ExtensionRunTestsRequest, IFileCoverage, ITestItem, ITestMessage, ITestRunProfile, ITestRunTask, ResolvedTestRunRequest, TestResultState, TestsDiffOp } from 'vs/workbench/contrib/testing/common/testTypes';
|
||||
import { CoverageDetails, ExtensionRunTestsRequest, IFileCoverage, ITestItem, ITestMessage, ITestRunProfile, ITestRunTask, ResolvedTestRunRequest, TestResultState, TestRunProfileBitset, TestsDiffOp } from 'vs/workbench/contrib/testing/common/testTypes';
|
||||
import { IExtHostContext, extHostNamedCustomer } from 'vs/workbench/services/extensions/common/extHostCustomers';
|
||||
import { ExtHostContext, ExtHostTestingShape, ILocationDto, ITestControllerPatch, MainContext, MainThreadTestingShape } from '../common/extHost.protocol';
|
||||
|
||||
|
@ -50,8 +50,11 @@ export class MainThreadTesting extends Disposable implements MainThreadTestingSh
|
|||
|
||||
this._register(Event.debounce(testProfiles.onDidChange, (_last, e) => e)(() => {
|
||||
const obj: Record</* controller id */string, /* profile id */ number[]> = {};
|
||||
for (const { controller, profiles } of this.testProfiles.all()) {
|
||||
obj[controller.id] = profiles.filter(p => p.isDefault).map(p => p.profileId);
|
||||
for (const group of [TestRunProfileBitset.Run, TestRunProfileBitset.Debug, TestRunProfileBitset.Coverage]) {
|
||||
for (const profile of this.testProfiles.getGroupDefaultProfiles(group)) {
|
||||
obj[profile.controllerId] ??= [];
|
||||
obj[profile.controllerId].push(profile.profileId);
|
||||
}
|
||||
}
|
||||
|
||||
this.proxy.$setDefaultRunProfiles(obj);
|
||||
|
|
Loading…
Reference in a new issue