@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,236 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { $, Dimension } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
|
-
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
4
|
-
import { BaseActionViewItem } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
5
|
-
import { DropdownMenuActionViewItem } from 'vscode/vscode/vs/base/browser/ui/dropdown/dropdownActionViewItem';
|
|
6
|
-
import { Action, Separator } from 'vscode/vscode/vs/base/common/actions';
|
|
7
|
-
import { Delayer } from 'vscode/vscode/vs/base/common/async';
|
|
8
|
-
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
9
|
-
import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
|
|
10
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
11
|
-
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
|
|
12
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
13
|
-
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
14
|
-
import { ContextScopedSuggestEnabledInputWithHistory } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput';
|
|
15
|
-
import { testingFilterIcon } from './icons.js';
|
|
16
|
-
import { StoredValue } from 'vscode/vscode/vs/workbench/contrib/testing/common/storedValue';
|
|
17
|
-
import { ITestExplorerFilterState } from 'vscode/vscode/vs/workbench/contrib/testing/common/testExplorerFilterState';
|
|
18
|
-
import { ITestService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testService';
|
|
19
|
-
import { denamespaceTestTag } from 'vscode/vscode/vs/workbench/contrib/testing/common/testTypes';
|
|
20
|
-
|
|
21
|
-
const testFilterDescriptions = {
|
|
22
|
-
["@failed" ]: ( localizeWithPath(
|
|
23
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
24
|
-
'testing.filters.showOnlyFailed',
|
|
25
|
-
"Show Only Failed Tests"
|
|
26
|
-
)),
|
|
27
|
-
["@executed" ]: ( localizeWithPath(
|
|
28
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
29
|
-
'testing.filters.showOnlyExecuted',
|
|
30
|
-
"Show Only Executed Tests"
|
|
31
|
-
)),
|
|
32
|
-
["@doc" ]: ( localizeWithPath(
|
|
33
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
34
|
-
'testing.filters.currentFile',
|
|
35
|
-
"Show in Active File Only"
|
|
36
|
-
)),
|
|
37
|
-
["@hidden" ]: ( localizeWithPath(
|
|
38
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
39
|
-
'testing.filters.showExcludedTests',
|
|
40
|
-
"Show Hidden Tests"
|
|
41
|
-
)),
|
|
42
|
-
};
|
|
43
|
-
let TestingExplorerFilter = class TestingExplorerFilter extends BaseActionViewItem {
|
|
44
|
-
constructor(action, state, instantiationService, testService) {
|
|
45
|
-
super(null, action);
|
|
46
|
-
this.state = state;
|
|
47
|
-
this.instantiationService = instantiationService;
|
|
48
|
-
this.testService = testService;
|
|
49
|
-
this.focusEmitter = this._register(( new Emitter()));
|
|
50
|
-
this.onDidFocus = this.focusEmitter.event;
|
|
51
|
-
this.history = this._register(this.instantiationService.createInstance(StoredValue, {
|
|
52
|
-
key: 'testing.filterHistory2',
|
|
53
|
-
scope: 1 ,
|
|
54
|
-
target: 1
|
|
55
|
-
}));
|
|
56
|
-
this.filtersAction = ( new Action('markersFiltersAction', ( localizeWithPath(
|
|
57
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
58
|
-
'testing.filters.menu',
|
|
59
|
-
"More Filters..."
|
|
60
|
-
)), 'testing-filter-button ' + ThemeIcon.asClassName(testingFilterIcon)));
|
|
61
|
-
this.updateFilterActiveState();
|
|
62
|
-
this._register(testService.excluded.onTestExclusionsChanged(this.updateFilterActiveState, this));
|
|
63
|
-
}
|
|
64
|
-
render(container) {
|
|
65
|
-
container.classList.add('testing-filter-action-item');
|
|
66
|
-
const updateDelayer = this._register(( new Delayer(400)));
|
|
67
|
-
const wrapper = this.wrapper = $('.testing-filter-wrapper');
|
|
68
|
-
container.appendChild(wrapper);
|
|
69
|
-
let history = this.history.get({ lastValue: '', values: [] });
|
|
70
|
-
if (history instanceof Array) {
|
|
71
|
-
history = { lastValue: '', values: history };
|
|
72
|
-
}
|
|
73
|
-
if (history.lastValue) {
|
|
74
|
-
this.state.setText(history.lastValue);
|
|
75
|
-
}
|
|
76
|
-
const input = this.input = this._register(this.instantiationService.createInstance(ContextScopedSuggestEnabledInputWithHistory, {
|
|
77
|
-
id: 'testing.explorer.filter',
|
|
78
|
-
ariaLabel: ( localizeWithPath(
|
|
79
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
80
|
-
'testExplorerFilterLabel',
|
|
81
|
-
"Filter text for tests in the explorer"
|
|
82
|
-
)),
|
|
83
|
-
parent: wrapper,
|
|
84
|
-
suggestionProvider: {
|
|
85
|
-
triggerCharacters: ['@'],
|
|
86
|
-
provideResults: () => [
|
|
87
|
-
...( Object.entries(testFilterDescriptions).map(([label, detail]) => ({ label, detail }))),
|
|
88
|
-
...( Iterable.map(( this.testService.collection.tags.values()), tag => {
|
|
89
|
-
const { ctrlId, tagId } = denamespaceTestTag(tag.id);
|
|
90
|
-
const insertText = `@${ctrlId}:${tagId}`;
|
|
91
|
-
return ({
|
|
92
|
-
label: `@${ctrlId}:${tagId}`,
|
|
93
|
-
detail: this.testService.collection.getNodeById(ctrlId)?.item.label,
|
|
94
|
-
insertText: tagId.includes(' ') ? `@${ctrlId}:"${tagId.replace(/(["\\])/g, '\\$1')}"` : insertText
|
|
95
|
-
});
|
|
96
|
-
})),
|
|
97
|
-
].filter(r => !this.state.text.value.includes(r.label)),
|
|
98
|
-
},
|
|
99
|
-
resourceHandle: 'testing:filter',
|
|
100
|
-
suggestOptions: {
|
|
101
|
-
value: this.state.text.value,
|
|
102
|
-
placeholderText: ( localizeWithPath(
|
|
103
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
104
|
-
'testExplorerFilter',
|
|
105
|
-
"Filter (e.g. text, !exclude, @tag)"
|
|
106
|
-
)),
|
|
107
|
-
},
|
|
108
|
-
history: history.values
|
|
109
|
-
}));
|
|
110
|
-
this._register(this.state.text.onDidChange(newValue => {
|
|
111
|
-
if (input.getValue() !== newValue) {
|
|
112
|
-
input.setValue(newValue);
|
|
113
|
-
}
|
|
114
|
-
}));
|
|
115
|
-
this._register(this.state.onDidRequestInputFocus(() => {
|
|
116
|
-
input.focus();
|
|
117
|
-
}));
|
|
118
|
-
this._register(input.onDidFocus(() => {
|
|
119
|
-
this.focusEmitter.fire();
|
|
120
|
-
}));
|
|
121
|
-
this._register(input.onInputDidChange(() => updateDelayer.trigger(() => {
|
|
122
|
-
input.addToHistory();
|
|
123
|
-
this.state.setText(input.getValue());
|
|
124
|
-
})));
|
|
125
|
-
const actionbar = this._register(( new ActionBar(container, {
|
|
126
|
-
actionViewItemProvider: action => {
|
|
127
|
-
if (action.id === this.filtersAction.id) {
|
|
128
|
-
return this.instantiationService.createInstance(FiltersDropdownMenuActionViewItem, action, this.state, this.actionRunner);
|
|
129
|
-
}
|
|
130
|
-
return undefined;
|
|
131
|
-
},
|
|
132
|
-
})));
|
|
133
|
-
actionbar.push(this.filtersAction, { icon: true, label: false });
|
|
134
|
-
this.layout(this.wrapper.clientWidth);
|
|
135
|
-
}
|
|
136
|
-
layout(width) {
|
|
137
|
-
this.input.layout(new Dimension(width - 24 - 8 - 22, 20));
|
|
138
|
-
}
|
|
139
|
-
focus() {
|
|
140
|
-
this.input.focus();
|
|
141
|
-
}
|
|
142
|
-
saveState() {
|
|
143
|
-
this.history.store({ lastValue: this.input.getValue(), values: this.input.getHistory() });
|
|
144
|
-
}
|
|
145
|
-
dispose() {
|
|
146
|
-
this.saveState();
|
|
147
|
-
super.dispose();
|
|
148
|
-
}
|
|
149
|
-
updateFilterActiveState() {
|
|
150
|
-
this.filtersAction.checked = this.testService.excluded.hasAny;
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
TestingExplorerFilter = ( __decorate([
|
|
154
|
-
( __param(1, ITestExplorerFilterState)),
|
|
155
|
-
( __param(2, IInstantiationService)),
|
|
156
|
-
( __param(3, ITestService))
|
|
157
|
-
], TestingExplorerFilter));
|
|
158
|
-
let FiltersDropdownMenuActionViewItem = class FiltersDropdownMenuActionViewItem extends DropdownMenuActionViewItem {
|
|
159
|
-
constructor(action, filters, actionRunner, contextMenuService, testService) {
|
|
160
|
-
super(action, { getActions: () => this.getActions() }, contextMenuService, {
|
|
161
|
-
actionRunner,
|
|
162
|
-
classNames: action.class,
|
|
163
|
-
anchorAlignmentProvider: () => 1 ,
|
|
164
|
-
menuAsChild: true
|
|
165
|
-
});
|
|
166
|
-
this.filters = filters;
|
|
167
|
-
this.testService = testService;
|
|
168
|
-
}
|
|
169
|
-
render(container) {
|
|
170
|
-
super.render(container);
|
|
171
|
-
this.updateChecked();
|
|
172
|
-
}
|
|
173
|
-
getActions() {
|
|
174
|
-
return [
|
|
175
|
-
...( ["@failed" , "@executed" , "@doc" ].map(term => ({
|
|
176
|
-
checked: this.filters.isFilteringFor(term),
|
|
177
|
-
class: undefined,
|
|
178
|
-
enabled: true,
|
|
179
|
-
id: term,
|
|
180
|
-
label: testFilterDescriptions[term],
|
|
181
|
-
run: () => this.filters.toggleFilteringFor(term),
|
|
182
|
-
tooltip: '',
|
|
183
|
-
dispose: () => null
|
|
184
|
-
}))),
|
|
185
|
-
( new Separator()),
|
|
186
|
-
{
|
|
187
|
-
checked: this.filters.fuzzy.value,
|
|
188
|
-
class: undefined,
|
|
189
|
-
enabled: true,
|
|
190
|
-
id: 'fuzzy',
|
|
191
|
-
label: ( localizeWithPath(
|
|
192
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
193
|
-
'testing.filters.fuzzyMatch',
|
|
194
|
-
"Fuzzy Match"
|
|
195
|
-
)),
|
|
196
|
-
run: () => this.filters.fuzzy.value = !this.filters.fuzzy.value,
|
|
197
|
-
tooltip: ''
|
|
198
|
-
},
|
|
199
|
-
( new Separator()),
|
|
200
|
-
{
|
|
201
|
-
checked: this.filters.isFilteringFor("@hidden" ),
|
|
202
|
-
class: undefined,
|
|
203
|
-
enabled: this.testService.excluded.hasAny,
|
|
204
|
-
id: 'showExcluded',
|
|
205
|
-
label: ( localizeWithPath(
|
|
206
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
207
|
-
'testing.filters.showExcludedTests',
|
|
208
|
-
"Show Hidden Tests"
|
|
209
|
-
)),
|
|
210
|
-
run: () => this.filters.toggleFilteringFor("@hidden" ),
|
|
211
|
-
tooltip: ''
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
class: undefined,
|
|
215
|
-
enabled: this.testService.excluded.hasAny,
|
|
216
|
-
id: 'removeExcluded',
|
|
217
|
-
label: ( localizeWithPath(
|
|
218
|
-
'vs/workbench/contrib/testing/browser/testingExplorerFilter',
|
|
219
|
-
'testing.filters.removeTestExclusions',
|
|
220
|
-
"Unhide All Tests"
|
|
221
|
-
)),
|
|
222
|
-
run: async () => this.testService.excluded.clear(),
|
|
223
|
-
tooltip: ''
|
|
224
|
-
}
|
|
225
|
-
];
|
|
226
|
-
}
|
|
227
|
-
updateChecked() {
|
|
228
|
-
this.element.classList.toggle('checked', this._action.checked);
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
FiltersDropdownMenuActionViewItem = ( __decorate([
|
|
232
|
-
( __param(3, IContextMenuService)),
|
|
233
|
-
( __param(4, ITestService))
|
|
234
|
-
], FiltersDropdownMenuActionViewItem));
|
|
235
|
-
|
|
236
|
-
export { TestingExplorerFilter };
|