@codingame/monaco-vscode-testing-service-override 3.2.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/testing.js +5 -4
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/external/tslib/tslib.es6.js +0 -11
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +0 -567
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/display.js +0 -3
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/index.js +0 -83
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.js +0 -186
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testItemContextOverlay.js +0 -18
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingObjectTree.js +0 -46
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingViewState.js +0 -17
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.js +0 -225
- package/vscode/src/vs/workbench/contrib/testing/browser/icons.js +0 -174
- package/vscode/src/vs/workbench/contrib/testing/browser/media/testing.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageBars.js +0 -227
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageView.js +0 -545
- package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.js +0 -1662
- package/vscode/src/vs/workbench/contrib/testing/browser/testing.contribution.js +0 -219
- package/vscode/src/vs/workbench/contrib/testing/browser/testingDecorations.js +0 -970
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +0 -236
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +0 -1227
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +0 -2091
- package/vscode/src/vs/workbench/contrib/testing/browser/testingProgressUiService.js +0 -142
- package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.js +0 -47
- package/vscode/src/vs/workbench/contrib/testing/browser/theme.js +0 -259
- package/vscode/src/vs/workbench/contrib/testing/common/configuration.js +0 -273
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +0 -59
- package/vscode/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.js +0 -129
- package/vscode/src/vs/workbench/contrib/testing/common/testExclusions.js +0 -48
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +0 -296
- package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.js +0 -125
- package/vscode/src/vs/workbench/contrib/testing/common/testingUri.js +0 -67
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { registerEditorContribution } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
2
|
-
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
|
-
import { CommandsRegistry, ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
5
|
-
import { Extensions as Extensions$2 } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
6
|
-
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
|
-
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
8
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
9
|
-
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
|
|
10
|
-
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
11
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
12
|
-
import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
13
|
-
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
14
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
|
|
15
|
-
import { REVEAL_IN_EXPLORER_COMMAND_ID } from 'vscode/vscode/vs/workbench/contrib/files/browser/fileConstants';
|
|
16
|
-
import { CodeCoverageDecorations } from './codeCoverageDecorations.js';
|
|
17
|
-
import { testingViewIcon, testingResultsIcon } from './icons.js';
|
|
18
|
-
import { ExplorerTestCoverageBars } from './testCoverageBars.js';
|
|
19
|
-
import { TestCoverageView } from './testCoverageView.js';
|
|
20
|
-
import { TestingDecorations } from './testingDecorations.js';
|
|
21
|
-
import { TestingExplorerView } from './testingExplorerView.js';
|
|
22
|
-
import { TestResultsView, OpenMessageInEditorAction, GoToPreviousMessageAction, GoToNextMessageAction, CloseTestPeek, ToggleTestingPeekHistory, TestingPeekOpener, TestingOutputPeekController } from './testingOutputPeek.js';
|
|
23
|
-
import { TestingProgressTrigger } from './testingProgressUiService.js';
|
|
24
|
-
import { TestingViewPaneContainer } from './testingViewPaneContainer.js';
|
|
25
|
-
import { testingConfiguration } from '../common/configuration.js';
|
|
26
|
-
import { ITestExplorerFilterState } from 'vscode/vscode/vs/workbench/contrib/testing/common/testExplorerFilterState';
|
|
27
|
-
import { TestId } from 'vscode/vscode/vs/workbench/contrib/testing/common/testId';
|
|
28
|
-
import { ITestResultService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testResultService';
|
|
29
|
-
import { ITestService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testService';
|
|
30
|
-
import { TestingContentProvider } from '../common/testingContentProvider.js';
|
|
31
|
-
import { TestingContextKeys } from 'vscode/vscode/vs/workbench/contrib/testing/common/testingContextKeys';
|
|
32
|
-
import { ITestingDecorationsService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testingDecorations';
|
|
33
|
-
import { ITestingPeekOpener } from 'vscode/vscode/vs/workbench/contrib/testing/common/testingPeekOpener';
|
|
34
|
-
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
|
|
35
|
-
import { allTestActions, discoverAndRunTests } from './testExplorerActions.js';
|
|
36
|
-
|
|
37
|
-
const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
38
|
-
id: "workbench.view.extension.test" ,
|
|
39
|
-
title: ( localize2WithPath(
|
|
40
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
41
|
-
'test',
|
|
42
|
-
'Testing'
|
|
43
|
-
)),
|
|
44
|
-
ctorDescriptor: ( new SyncDescriptor(TestingViewPaneContainer)),
|
|
45
|
-
icon: testingViewIcon,
|
|
46
|
-
alwaysUseContainerInfo: true,
|
|
47
|
-
order: 6,
|
|
48
|
-
openCommandActionDescriptor: {
|
|
49
|
-
id: "workbench.view.extension.test" ,
|
|
50
|
-
mnemonicTitle: ( localizeWithPath(
|
|
51
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
52
|
-
{ key: 'miViewTesting', comment: ['&& denotes a mnemonic'] },
|
|
53
|
-
"T&&esting"
|
|
54
|
-
)),
|
|
55
|
-
order: 4,
|
|
56
|
-
},
|
|
57
|
-
hideIfEmpty: true,
|
|
58
|
-
}, 0 );
|
|
59
|
-
const testResultsViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
60
|
-
id: "workbench.panel.testResults" ,
|
|
61
|
-
title: ( localize2WithPath(
|
|
62
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
63
|
-
'testResultsPanelName',
|
|
64
|
-
"Test Results"
|
|
65
|
-
)),
|
|
66
|
-
icon: testingResultsIcon,
|
|
67
|
-
ctorDescriptor: ( new SyncDescriptor(
|
|
68
|
-
ViewPaneContainer,
|
|
69
|
-
["workbench.panel.testResults" , { mergeViewWithContainerWhenSingleView: true }]
|
|
70
|
-
)),
|
|
71
|
-
hideIfEmpty: true,
|
|
72
|
-
order: 3,
|
|
73
|
-
}, 1 , { doNotRegisterOpenCommand: true });
|
|
74
|
-
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
75
|
-
viewsRegistry.registerViews([{
|
|
76
|
-
id: "workbench.panel.testResults.view" ,
|
|
77
|
-
name: ( localize2WithPath(
|
|
78
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
79
|
-
'testResultsPanelName',
|
|
80
|
-
"Test Results"
|
|
81
|
-
)),
|
|
82
|
-
containerIcon: testingResultsIcon,
|
|
83
|
-
canToggleVisibility: false,
|
|
84
|
-
canMoveView: true,
|
|
85
|
-
when: ( TestingContextKeys.hasAnyResults.isEqualTo(true)),
|
|
86
|
-
ctorDescriptor: ( new SyncDescriptor(TestResultsView)),
|
|
87
|
-
}], testResultsViewContainer);
|
|
88
|
-
viewsRegistry.registerViewWelcomeContent("workbench.view.testing" , {
|
|
89
|
-
content: ( localizeWithPath(
|
|
90
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
91
|
-
'noTestProvidersRegistered',
|
|
92
|
-
"No tests have been found in this workspace yet."
|
|
93
|
-
)),
|
|
94
|
-
});
|
|
95
|
-
viewsRegistry.registerViewWelcomeContent("workbench.view.testing" , {
|
|
96
|
-
content: '[' + ( localizeWithPath(
|
|
97
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
98
|
-
'searchForAdditionalTestExtensions',
|
|
99
|
-
"Install Additional Test Extensions..."
|
|
100
|
-
)) + `](command:${"testing.searchForTestExtension" })`,
|
|
101
|
-
order: 10
|
|
102
|
-
});
|
|
103
|
-
viewsRegistry.registerViews([{
|
|
104
|
-
id: "workbench.view.testing" ,
|
|
105
|
-
name: ( localize2WithPath(
|
|
106
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
107
|
-
'testExplorer',
|
|
108
|
-
"Test Explorer"
|
|
109
|
-
)),
|
|
110
|
-
ctorDescriptor: ( new SyncDescriptor(TestingExplorerView)),
|
|
111
|
-
canToggleVisibility: true,
|
|
112
|
-
canMoveView: true,
|
|
113
|
-
weight: 80,
|
|
114
|
-
order: -999,
|
|
115
|
-
containerIcon: testingViewIcon,
|
|
116
|
-
when: ContextKeyExpr.greater(TestingContextKeys.providerCount.key, 0),
|
|
117
|
-
}, {
|
|
118
|
-
id: "workbench.view.testCoverage" ,
|
|
119
|
-
name: ( localize2WithPath(
|
|
120
|
-
'vs/workbench/contrib/testing/browser/testing.contribution',
|
|
121
|
-
'testCoverage',
|
|
122
|
-
"Test Coverage"
|
|
123
|
-
)),
|
|
124
|
-
ctorDescriptor: ( new SyncDescriptor(TestCoverageView)),
|
|
125
|
-
canToggleVisibility: true,
|
|
126
|
-
canMoveView: true,
|
|
127
|
-
weight: 80,
|
|
128
|
-
order: -998,
|
|
129
|
-
containerIcon: testingViewIcon,
|
|
130
|
-
when: TestingContextKeys.isTestCoverageOpen,
|
|
131
|
-
}], viewContainer);
|
|
132
|
-
allTestActions.forEach(registerAction2);
|
|
133
|
-
registerAction2(OpenMessageInEditorAction);
|
|
134
|
-
registerAction2(GoToPreviousMessageAction);
|
|
135
|
-
registerAction2(GoToNextMessageAction);
|
|
136
|
-
registerAction2(CloseTestPeek);
|
|
137
|
-
registerAction2(ToggleTestingPeekHistory);
|
|
138
|
-
( Registry.as(Extensions$1.Workbench)).registerWorkbenchContribution(TestingContentProvider, 3 );
|
|
139
|
-
( Registry.as(Extensions$1.Workbench)).registerWorkbenchContribution(TestingPeekOpener, 4 );
|
|
140
|
-
( Registry.as(Extensions$1.Workbench)).registerWorkbenchContribution(TestingProgressTrigger, 4 );
|
|
141
|
-
registerEditorContribution("editor.contrib.testingOutputPeek" , TestingOutputPeekController, 1 );
|
|
142
|
-
registerEditorContribution("editor.contrib.testingDecorations" , TestingDecorations, 1 );
|
|
143
|
-
registerEditorContribution("editor.contrib.coverageDecorations" , CodeCoverageDecorations, 3 );
|
|
144
|
-
CommandsRegistry.registerCommand({
|
|
145
|
-
id: '_revealTestInExplorer',
|
|
146
|
-
handler: async (accessor, testId, focus) => {
|
|
147
|
-
accessor.get(ITestExplorerFilterState).reveal.value = typeof testId === 'string' ? testId : testId.extId;
|
|
148
|
-
accessor.get(IViewsService).openView("workbench.view.testing" , focus);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
CommandsRegistry.registerCommand({
|
|
152
|
-
id: 'vscode.peekTestError',
|
|
153
|
-
handler: async (accessor, extId) => {
|
|
154
|
-
const lookup = accessor.get(ITestResultService).getStateById(extId);
|
|
155
|
-
if (!lookup) {
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
const [result, ownState] = lookup;
|
|
159
|
-
const opener = accessor.get(ITestingPeekOpener);
|
|
160
|
-
if (opener.tryPeekFirstError(result, ownState)) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
for (const test of result.tests) {
|
|
164
|
-
if (TestId.compare(ownState.item.extId, test.item.extId) === 2 && opener.tryPeekFirstError(result, test)) {
|
|
165
|
-
return true;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
CommandsRegistry.registerCommand({
|
|
172
|
-
id: 'vscode.revealTest',
|
|
173
|
-
handler: async (accessor, extId) => {
|
|
174
|
-
const test = accessor.get(ITestService).collection.getNodeById(extId);
|
|
175
|
-
if (!test) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
const commandService = accessor.get(ICommandService);
|
|
179
|
-
const fileService = accessor.get(IFileService);
|
|
180
|
-
const openerService = accessor.get(IOpenerService);
|
|
181
|
-
const { range, uri } = test.item;
|
|
182
|
-
if (!uri) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
const position = accessor.get(ITestingDecorationsService).getDecoratedTestPosition(uri, extId) || range?.getStartPosition();
|
|
186
|
-
accessor.get(ITestExplorerFilterState).reveal.value = extId;
|
|
187
|
-
accessor.get(ITestingPeekOpener).closeAllPeeks();
|
|
188
|
-
let isFile = true;
|
|
189
|
-
try {
|
|
190
|
-
if (!(await fileService.stat(uri)).isFile) {
|
|
191
|
-
isFile = false;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
catch {
|
|
195
|
-
}
|
|
196
|
-
if (!isFile) {
|
|
197
|
-
await commandService.executeCommand(REVEAL_IN_EXPLORER_COMMAND_ID, uri);
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
await openerService.open(position
|
|
201
|
-
? uri.with({ fragment: `L${position.lineNumber}:${position.column}` })
|
|
202
|
-
: uri);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
CommandsRegistry.registerCommand({
|
|
206
|
-
id: 'vscode.runTestsById',
|
|
207
|
-
handler: async (accessor, group, ...testIds) => {
|
|
208
|
-
const testService = accessor.get(ITestService);
|
|
209
|
-
await discoverAndRunTests(accessor.get(ITestService).collection, accessor.get(IProgressService), testIds, tests => testService.runTests({ group, tests }));
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
( Registry.as(Extensions$2.Configuration)).registerConfiguration(testingConfiguration);
|
|
213
|
-
( Registry.as(
|
|
214
|
-
"workbench.registry.explorer.fileContributions"
|
|
215
|
-
)).register({
|
|
216
|
-
create(insta, container) {
|
|
217
|
-
return insta.createInstance(ExplorerTestCoverageBars, { compact: true, container });
|
|
218
|
-
},
|
|
219
|
-
});
|