@codingame/monaco-vscode-testing-service-override 17.2.0 → 18.0.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 +19 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackWidget.js +17 -16
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +24 -23
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDisplayUtils.js +5 -5
- package/vscode/src/vs/workbench/contrib/testing/browser/icons.js +29 -29
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageBars.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageBars.js +14 -13
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageView.js +18 -18
- package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.js +74 -70
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.js +7 -7
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.js +21 -21
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.js +4 -4
- package/vscode/src/vs/workbench/contrib/testing/browser/testing.contribution.js +9 -9
- package/vscode/src/vs/workbench/contrib/testing/browser/testingConfigurationUi.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/browser/testingDecorations.js +23 -20
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +12 -12
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +26 -45
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +14 -14
- package/vscode/src/vs/workbench/contrib/testing/browser/testingProgressUiService.js +6 -6
- package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/browser/theme.js +32 -32
- package/vscode/src/vs/workbench/contrib/testing/common/configuration.js +34 -34
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +2 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +34 -29
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-testing-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - testing service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,20 +15,24 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-0b087f42-a5a3-5eb9-9bfd-1eebc1bba163-common": "
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-
|
|
26
|
-
"@codingame/monaco-vscode-
|
|
27
|
-
"@codingame/monaco-vscode-
|
|
28
|
-
"@codingame/monaco-vscode-
|
|
29
|
-
"@codingame/monaco-vscode-
|
|
30
|
-
"@codingame/monaco-vscode-
|
|
31
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-0b087f42-a5a3-5eb9-9bfd-1eebc1bba163-common": "18.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common": "18.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "18.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common": "18.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-7adbeffb-8051-54a9-8c9b-b62ce9e5836f-common": "18.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-8bcd87e5-7461-57cf-b4e4-a7b00d2b33df-common": "18.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-8d39d04c-3201-5bd6-be79-eed8d17a5ad0-common": "18.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-924e8f00-6faf-5059-b518-e43427d29ab3-common": "18.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-937ecbdf-94c7-5b16-aefa-ad78ae557a93-common": "18.0.0",
|
|
27
|
+
"@codingame/monaco-vscode-97284942-b044-5fbb-b53b-3f46d2468746-common": "18.0.0",
|
|
28
|
+
"@codingame/monaco-vscode-9c72783f-914c-50be-b9ef-da16356d81a8-common": "18.0.0",
|
|
29
|
+
"@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "18.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "18.0.0",
|
|
31
|
+
"@codingame/monaco-vscode-api": "18.0.0",
|
|
32
|
+
"@codingame/monaco-vscode-b99aef83-0d60-5e8c-a62e-9908b6256f35-common": "18.0.0",
|
|
33
|
+
"@codingame/monaco-vscode-f24b7f0a-ceeb-5877-9148-81eb98a4f5d7-common": "18.0.0",
|
|
34
|
+
"@codingame/monaco-vscode-f6ab89b2-83b0-5a43-8772-cb0eafa650b5-common": "18.0.0",
|
|
35
|
+
"@codingame/monaco-vscode-terminal-service-override": "18.0.0"
|
|
32
36
|
},
|
|
33
37
|
"main": "index.js",
|
|
34
38
|
"module": "index.js",
|
|
@@ -28,14 +28,15 @@ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/l
|
|
|
28
28
|
import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
29
29
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
30
30
|
import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
31
|
-
import { ResourceLabel } from '@codingame/monaco-vscode-
|
|
31
|
+
import { ResourceLabel } from '@codingame/monaco-vscode-f24b7f0a-ceeb-5877-9148-81eb98a4f5d7-common/vscode/vs/workbench/browser/labels';
|
|
32
32
|
import { SIDE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
33
33
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
34
34
|
import { makeStackFrameColumnDecoration, TOP_STACK_FRAME_DECORATION } from '@codingame/monaco-vscode-b99aef83-0d60-5e8c-a62e-9908b6256f35-common/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution';
|
|
35
35
|
import * as callStackWidget from './media/callStackWidget.css';
|
|
36
|
-
import { autorun, autorunWithStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
36
|
+
import { autorun, autorunWithStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
37
|
+
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
38
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
39
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
39
40
|
|
|
40
41
|
var FrameCodeRenderer_1, MissingCodeRenderer_1, SkippedRenderer_1;
|
|
41
42
|
registerCss(callStackWidget);
|
|
@@ -179,7 +180,7 @@ let StackAccessibilityProvider = class StackAccessibilityProvider {
|
|
|
179
180
|
if (e instanceof CallStackFrame) {
|
|
180
181
|
if (e.source && e.line) {
|
|
181
182
|
return localize(
|
|
182
|
-
|
|
183
|
+
5667,
|
|
183
184
|
'{0}, line {1} in {2}',
|
|
184
185
|
e.name,
|
|
185
186
|
e.line,
|
|
@@ -191,7 +192,7 @@ let StackAccessibilityProvider = class StackAccessibilityProvider {
|
|
|
191
192
|
assertNever();
|
|
192
193
|
}
|
|
193
194
|
getWidgetAriaLabel() {
|
|
194
|
-
return localize(
|
|
195
|
+
return localize(5668, 'Stack Trace');
|
|
195
196
|
}
|
|
196
197
|
};
|
|
197
198
|
StackAccessibilityProvider = ( __decorate([
|
|
@@ -276,7 +277,7 @@ let AbstractFrameRenderer = class AbstractFrameRenderer {
|
|
|
276
277
|
templateStore,
|
|
277
278
|
});
|
|
278
279
|
}
|
|
279
|
-
renderElement(element, index, template
|
|
280
|
+
renderElement(element, index, template) {
|
|
280
281
|
const { elementStore } = template;
|
|
281
282
|
elementStore.clear();
|
|
282
283
|
const item = element;
|
|
@@ -294,7 +295,7 @@ let AbstractFrameRenderer = class AbstractFrameRenderer {
|
|
|
294
295
|
elementStore.add(collapse.onDidClick(toggleCollapse));
|
|
295
296
|
elementStore.add(addDisposableListener(elements.title, 'click', toggleCollapse));
|
|
296
297
|
}
|
|
297
|
-
disposeElement(element, index, templateData
|
|
298
|
+
disposeElement(element, index, templateData) {
|
|
298
299
|
templateData.elementStore.clear();
|
|
299
300
|
}
|
|
300
301
|
disposeTemplate(templateData) {
|
|
@@ -331,8 +332,8 @@ let FrameCodeRenderer = class FrameCodeRenderer extends AbstractFrameRenderer {
|
|
|
331
332
|
}));
|
|
332
333
|
return { ...data, editor, toolbar };
|
|
333
334
|
}
|
|
334
|
-
renderElement(element, index, template
|
|
335
|
-
super.renderElement(element, index, template
|
|
335
|
+
renderElement(element, index, template) {
|
|
336
|
+
super.renderElement(element, index, template);
|
|
336
337
|
const { elementStore, editor } = template;
|
|
337
338
|
const item = element;
|
|
338
339
|
const uri = item.source;
|
|
@@ -411,7 +412,7 @@ let MissingCodeRenderer = class MissingCodeRenderer {
|
|
|
411
412
|
const cast = element;
|
|
412
413
|
templateData.label.element.setResource({
|
|
413
414
|
name: cast.name,
|
|
414
|
-
description: ( localize(
|
|
415
|
+
description: ( localize(5669, 'Line {0} column {1}', cast.line, cast.column)),
|
|
415
416
|
range: { startLineNumber: cast.line, startColumn: cast.column, endColumn: cast.column, endLineNumber: cast.line },
|
|
416
417
|
}, {
|
|
417
418
|
icon: Codicon.fileBinary,
|
|
@@ -434,8 +435,8 @@ class CustomRenderer extends AbstractFrameRenderer {
|
|
|
434
435
|
finishRenderTemplate(data) {
|
|
435
436
|
return data;
|
|
436
437
|
}
|
|
437
|
-
renderElement(element, index, template
|
|
438
|
-
super.renderElement(element, index, template
|
|
438
|
+
renderElement(element, index, template) {
|
|
439
|
+
super.renderElement(element, index, template);
|
|
439
440
|
const item = element;
|
|
440
441
|
const { elementStore, container, label } = template;
|
|
441
442
|
label.element.setResource({ name: item.original.label }, { icon: item.original.icon });
|
|
@@ -472,12 +473,12 @@ let SkippedRenderer = class SkippedRenderer {
|
|
|
472
473
|
}
|
|
473
474
|
button.enabled = false;
|
|
474
475
|
this.loadFrames(data.current).catch(e => {
|
|
475
|
-
this.notificationService.error(( localize(
|
|
476
|
+
this.notificationService.error(( localize(5670, 'Failed to load stack frames: {0}', e.message)));
|
|
476
477
|
});
|
|
477
478
|
}));
|
|
478
479
|
return data;
|
|
479
480
|
}
|
|
480
|
-
renderElement(element, index, templateData
|
|
481
|
+
renderElement(element, index, templateData) {
|
|
481
482
|
const cast = element;
|
|
482
483
|
templateData.button.enabled = true;
|
|
483
484
|
templateData.button.label = cast.label;
|
|
@@ -549,7 +550,7 @@ registerAction2(class extends Action2 {
|
|
|
549
550
|
constructor() {
|
|
550
551
|
super({
|
|
551
552
|
id: 'callStackWidget.goToFile',
|
|
552
|
-
title: ( localize2(
|
|
553
|
+
title: ( localize2(5671, 'Open File')),
|
|
553
554
|
icon: Codicon.goToFile,
|
|
554
555
|
menu: {
|
|
555
556
|
id: MenuId.DebugCallStackToolbar,
|
|
@@ -49,13 +49,13 @@ import { TestingContextKeys } from '../common/testingContextKeys.js';
|
|
|
49
49
|
import { labels, getLabelForItem } from './codeCoverageDisplayUtils.js';
|
|
50
50
|
import { testingCoverageMissingBranch, testingCoverageReport, testingFilterIcon, testingRerunIcon } from './icons.js';
|
|
51
51
|
import { ManagedTestCoverageBars } from './testCoverageBars.js';
|
|
52
|
-
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/
|
|
53
|
-
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/derived';
|
|
54
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
|
|
52
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
53
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
54
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
55
55
|
|
|
56
56
|
const CLASS_HIT = 'coverage-deco-hit';
|
|
57
57
|
const CLASS_MISS = 'coverage-deco-miss';
|
|
58
|
-
const TOGGLE_INLINE_COMMAND_TEXT = ( localize(
|
|
58
|
+
const TOGGLE_INLINE_COMMAND_TEXT = ( localize(11014, 'Toggle Inline'));
|
|
59
59
|
const TOGGLE_INLINE_COMMAND_ID = 'testing.toggleInlineCoverage';
|
|
60
60
|
const BRANCH_MISS_INDICATOR_CHARS = 4;
|
|
61
61
|
let CodeCoverageDecorations = class CodeCoverageDecorations extends Disposable {
|
|
@@ -89,6 +89,7 @@ let CodeCoverageDecorations = class CodeCoverageDecorations extends Disposable {
|
|
|
89
89
|
return { file, testId: coverage.filterToTest.read(reader) };
|
|
90
90
|
});
|
|
91
91
|
this._register(bindContextKey(TestingContextKeys.hasPerTestCoverage, contextKeyService, reader => !!fileCoverage.read(reader)?.file.perTestData?.size));
|
|
92
|
+
this._register(bindContextKey(TestingContextKeys.hasCoverageInFile, contextKeyService, reader => !!fileCoverage.read(reader)?.file));
|
|
92
93
|
this._register(autorun(reader => {
|
|
93
94
|
const c = fileCoverage.read(reader);
|
|
94
95
|
if (c) {
|
|
@@ -379,7 +380,7 @@ class CoverageDetailsModel {
|
|
|
379
380
|
if (detail.branches?.length) {
|
|
380
381
|
const covered = detail.branches.filter(b => !!b.count).length;
|
|
381
382
|
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
382
|
-
|
|
383
|
+
11015,
|
|
383
384
|
'{0} of {1} of branches in {2} were covered.',
|
|
384
385
|
covered,
|
|
385
386
|
detail.branches.length,
|
|
@@ -395,13 +396,13 @@ class CoverageDetailsModel {
|
|
|
395
396
|
const { count, label } = detail.detail.branches[detail.branch];
|
|
396
397
|
const label2 = label ? wrapInBackticks(label) : `#${detail.branch + 1}`;
|
|
397
398
|
if (!count) {
|
|
398
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
399
|
+
return ( new MarkdownString()).appendMarkdown(( localize(11016, 'Branch {0} in {1} was not covered.', label2, text)));
|
|
399
400
|
}
|
|
400
401
|
else if (count === true) {
|
|
401
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
402
|
+
return ( new MarkdownString()).appendMarkdown(( localize(11017, 'Branch {0} in {1} was executed.', label2, text)));
|
|
402
403
|
}
|
|
403
404
|
else {
|
|
404
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
405
|
+
return ( new MarkdownString()).appendMarkdown(( localize(11018, 'Branch {0} in {1} was executed {2} time(s).', label2, text, count)));
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
408
|
assertNever();
|
|
@@ -409,10 +410,10 @@ class CoverageDetailsModel {
|
|
|
409
410
|
}
|
|
410
411
|
function namedDetailLabel(name, detail) {
|
|
411
412
|
return ( new MarkdownString()).appendMarkdown(!detail.count
|
|
412
|
-
? ( localize(
|
|
413
|
+
? ( localize(11019, '`{0}` was not executed.', name))
|
|
413
414
|
: typeof detail.count === 'number'
|
|
414
|
-
? ( localize(
|
|
415
|
-
: ( localize(
|
|
415
|
+
? ( localize(11020, '`{0}` was executed {1} time(s).', name, detail.count))
|
|
416
|
+
: ( localize(11021, '`{0}` was executed.', name)));
|
|
416
417
|
}
|
|
417
418
|
function tidyLocation(location) {
|
|
418
419
|
if (location instanceof Position) {
|
|
@@ -509,8 +510,8 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
509
510
|
return;
|
|
510
511
|
}
|
|
511
512
|
const toggleAction = ( new ActionWithIcon('toggleInline', this.coverage.showInline.get()
|
|
512
|
-
? ( localize(
|
|
513
|
-
: ( localize(
|
|
513
|
+
? ( localize(11022, 'Hide Inline Coverage'))
|
|
514
|
+
: ( localize(11023, 'Show Inline Coverage')), testingCoverageReport, undefined, () => this.coverage.showInline.set(!this.coverage.showInline.get(), undefined)));
|
|
514
515
|
const kb = this.keybindingService.lookupKeybinding(TOGGLE_INLINE_COMMAND_ID);
|
|
515
516
|
if (kb) {
|
|
516
517
|
toggleAction.tooltip = `${TOGGLE_INLINE_COMMAND_TEXT} (${kb.getLabel()})`;
|
|
@@ -529,12 +530,12 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
529
530
|
}
|
|
530
531
|
else if (current.coverage.perTestData?.size) {
|
|
531
532
|
this.actionBar.push(( new ActionWithIcon('perTestFilter', ( localize(
|
|
532
|
-
|
|
533
|
+
11024,
|
|
533
534
|
"{0} test(s) ran code in this file",
|
|
534
535
|
current.coverage.perTestData.size
|
|
535
536
|
)), testingFilterIcon, undefined, () => this.commandService.executeCommand(TestCommandId.CoverageFilterToTestInEditor, this.current, this.editor))));
|
|
536
537
|
}
|
|
537
|
-
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(
|
|
538
|
+
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(11025, 'Rerun')), testingRerunIcon, !this.isRunning, () => this.rerunTest())));
|
|
538
539
|
}
|
|
539
540
|
show() {
|
|
540
541
|
if (this.registered) {
|
|
@@ -594,7 +595,7 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
594
595
|
constructor() {
|
|
595
596
|
super({
|
|
596
597
|
id: TOGGLE_INLINE_COMMAND_ID,
|
|
597
|
-
title: ( localize2(
|
|
598
|
+
title: ( localize2(11026, "Toggle Inline Coverage")),
|
|
598
599
|
category: Categories.Test,
|
|
599
600
|
keybinding: {
|
|
600
601
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -602,12 +603,12 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
602
603
|
},
|
|
603
604
|
toggled: {
|
|
604
605
|
condition: TestingContextKeys.inlineCoverageEnabled,
|
|
605
|
-
title: ( localize(
|
|
606
|
+
title: ( localize(11027, "Hide Inline Coverage")),
|
|
606
607
|
},
|
|
607
608
|
icon: testingCoverageReport,
|
|
608
609
|
menu: [
|
|
609
610
|
{ id: MenuId.CommandPalette, when: TestingContextKeys.isTestCoverageOpen },
|
|
610
|
-
{ id: MenuId.EditorTitle, when: ( ContextKeyExpr.and(TestingContextKeys.
|
|
611
|
+
{ id: MenuId.EditorTitle, when: ( ContextKeyExpr.and(TestingContextKeys.hasCoverageInFile, ( TestingContextKeys.coverageToolbarEnabled.notEqualsTo(true)))), group: 'navigation' },
|
|
611
612
|
]
|
|
612
613
|
});
|
|
613
614
|
}
|
|
@@ -620,9 +621,9 @@ registerAction2(class ToggleCoverageToolbar extends Action2 {
|
|
|
620
621
|
constructor() {
|
|
621
622
|
super({
|
|
622
623
|
id: TestCommandId.CoverageToggleToolbar,
|
|
623
|
-
title: ( localize2(
|
|
624
|
+
title: ( localize2(11028, "Test Coverage Toolbar")),
|
|
624
625
|
metadata: {
|
|
625
|
-
description: ( localize2(
|
|
626
|
+
description: ( localize2(11029, 'Toggle the sticky coverage bar in the editor.'))
|
|
626
627
|
},
|
|
627
628
|
category: Categories.Test,
|
|
628
629
|
toggled: {
|
|
@@ -631,7 +632,7 @@ registerAction2(class ToggleCoverageToolbar extends Action2 {
|
|
|
631
632
|
menu: [
|
|
632
633
|
{ id: MenuId.CommandPalette, when: TestingContextKeys.isTestCoverageOpen },
|
|
633
634
|
{ id: MenuId.StickyScrollContext, when: TestingContextKeys.isTestCoverageOpen },
|
|
634
|
-
{ id: MenuId.EditorTitle, when: TestingContextKeys.
|
|
635
|
+
{ id: MenuId.EditorTitle, when: TestingContextKeys.hasCoverageInFile, group: 'coverage@1' },
|
|
635
636
|
]
|
|
636
637
|
});
|
|
637
638
|
}
|
|
@@ -645,7 +646,7 @@ registerAction2(class FilterCoverageToTestInEditor extends Action2 {
|
|
|
645
646
|
constructor() {
|
|
646
647
|
super({
|
|
647
648
|
id: TestCommandId.CoverageFilterToTestInEditor,
|
|
648
|
-
title: ( localize2(
|
|
649
|
+
title: ( localize2(11030, "Filter Coverage to Test")),
|
|
649
650
|
category: Categories.Test,
|
|
650
651
|
icon: Codicon.filter,
|
|
651
652
|
toggled: {
|
|
@@ -655,7 +656,7 @@ registerAction2(class FilterCoverageToTestInEditor extends Action2 {
|
|
|
655
656
|
menu: [
|
|
656
657
|
{
|
|
657
658
|
id: MenuId.EditorTitle,
|
|
658
|
-
when: ( ContextKeyExpr.and(TestingContextKeys.
|
|
659
|
+
when: ( ContextKeyExpr.and(TestingContextKeys.hasCoverageInFile, ( TestingContextKeys.coverageToolbarEnabled.notEqualsTo(true)), TestingContextKeys.hasPerTestCoverage, ( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)))),
|
|
659
660
|
group: 'navigation',
|
|
660
661
|
},
|
|
661
662
|
]
|
|
@@ -75,11 +75,11 @@ function getLabelForItem(result, testId, commonPrefixLen) {
|
|
|
75
75
|
}
|
|
76
76
|
var labels;
|
|
77
77
|
(function (labels) {
|
|
78
|
-
labels.showingFilterFor = (label) => ( localize(
|
|
79
|
-
labels.clickToChangeFiltering = ( localize(
|
|
80
|
-
labels.percentCoverage = (percent, precision) => ( localize(
|
|
81
|
-
labels.allTests = ( localize(
|
|
82
|
-
labels.pickShowCoverage = ( localize(
|
|
78
|
+
labels.showingFilterFor = (label) => ( localize(11031, "Showing \"{0}\"", label));
|
|
79
|
+
labels.clickToChangeFiltering = ( localize(11032, 'Click to view coverage for a single test'));
|
|
80
|
+
labels.percentCoverage = (percent, precision) => ( localize(11033, '{0} Coverage', displayPercent(percent, precision)));
|
|
81
|
+
labels.allTests = ( localize(11034, 'All tests'));
|
|
82
|
+
labels.pickShowCoverage = ( localize(11035, 'Pick a test to show coverage for'));
|
|
83
83
|
})(labels || (labels = {}));
|
|
84
84
|
|
|
85
85
|
export { calculateDisplayedStat, displayPercent, getCoverageColor, getLabelForItem, labels, percent };
|
|
@@ -7,37 +7,37 @@ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/th
|
|
|
7
7
|
import { testStatesToIconColors, testStatesToRetiredIconColors, testingColorRunAction } from './theme.js';
|
|
8
8
|
import { TestResultState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testTypes';
|
|
9
9
|
|
|
10
|
-
const testingViewIcon = registerIcon('test-view-icon', Codicon.beaker, ( localize(
|
|
11
|
-
const testingResultsIcon = registerIcon('test-results-icon', Codicon.checklist, ( localize(
|
|
12
|
-
const testingRunIcon = registerIcon('testing-run-icon', Codicon.run, ( localize(
|
|
13
|
-
const testingRerunIcon = registerIcon('testing-rerun-icon', Codicon.debugRerun, ( localize(
|
|
14
|
-
const testingRunAllIcon = registerIcon('testing-run-all-icon', Codicon.runAll, ( localize(
|
|
15
|
-
const testingDebugAllIcon = registerIcon('testing-debug-all-icon', Codicon.debugAltSmall, ( localize(
|
|
16
|
-
const testingDebugIcon = registerIcon('testing-debug-icon', Codicon.debugAltSmall, ( localize(
|
|
17
|
-
const testingCoverageIcon = registerIcon('testing-coverage-icon', Codicon.runCoverage, ( localize(
|
|
18
|
-
const testingCoverageAllIcon = registerIcon('testing-coverage-all-icon', Codicon.runAllCoverage, ( localize(
|
|
19
|
-
const testingCancelIcon = registerIcon('testing-cancel-icon', Codicon.debugStop, ( localize(
|
|
20
|
-
const testingFilterIcon = registerIcon('testing-filter', Codicon.filter, ( localize(
|
|
21
|
-
const testingHiddenIcon = registerIcon('testing-hidden', Codicon.eyeClosed, ( localize(
|
|
22
|
-
registerIcon('testing-show-as-list-icon', Codicon.listTree, ( localize(
|
|
23
|
-
registerIcon('testing-show-as-list-icon', Codicon.listFlat, ( localize(
|
|
24
|
-
const testingUpdateProfiles = registerIcon('testing-update-profiles', Codicon.gear, ( localize(
|
|
25
|
-
const testingRefreshTests = registerIcon('testing-refresh-tests', Codicon.refresh, ( localize(
|
|
26
|
-
const testingTurnContinuousRunOn = registerIcon('testing-turn-continuous-run-on', Codicon.eye, ( localize(
|
|
27
|
-
const testingTurnContinuousRunOff = registerIcon('testing-turn-continuous-run-off', Codicon.eyeClosed, ( localize(
|
|
28
|
-
const testingContinuousIsOn = registerIcon('testing-continuous-is-on', Codicon.eye, ( localize(
|
|
29
|
-
const testingCancelRefreshTests = registerIcon('testing-cancel-refresh-tests', Codicon.stop, ( localize(
|
|
30
|
-
const testingCoverageReport = registerIcon('testing-coverage', Codicon.coverage, ( localize(
|
|
31
|
-
const testingWasCovered = registerIcon('testing-was-covered', Codicon.check, ( localize(
|
|
32
|
-
const testingCoverageMissingBranch = registerIcon('testing-missing-branch', Codicon.question, ( localize(
|
|
10
|
+
const testingViewIcon = registerIcon('test-view-icon', Codicon.beaker, ( localize(11036, 'View icon of the test view.')));
|
|
11
|
+
const testingResultsIcon = registerIcon('test-results-icon', Codicon.checklist, ( localize(11037, 'Icons for test results.')));
|
|
12
|
+
const testingRunIcon = registerIcon('testing-run-icon', Codicon.run, ( localize(11038, 'Icon of the "run test" action.')));
|
|
13
|
+
const testingRerunIcon = registerIcon('testing-rerun-icon', Codicon.debugRerun, ( localize(11039, 'Icon of the "rerun tests" action.')));
|
|
14
|
+
const testingRunAllIcon = registerIcon('testing-run-all-icon', Codicon.runAll, ( localize(11040, 'Icon of the "run all tests" action.')));
|
|
15
|
+
const testingDebugAllIcon = registerIcon('testing-debug-all-icon', Codicon.debugAltSmall, ( localize(11041, 'Icon of the "debug all tests" action.')));
|
|
16
|
+
const testingDebugIcon = registerIcon('testing-debug-icon', Codicon.debugAltSmall, ( localize(11042, 'Icon of the "debug test" action.')));
|
|
17
|
+
const testingCoverageIcon = registerIcon('testing-coverage-icon', Codicon.runCoverage, ( localize(11043, 'Icon of the "run test with coverage" action.')));
|
|
18
|
+
const testingCoverageAllIcon = registerIcon('testing-coverage-all-icon', Codicon.runAllCoverage, ( localize(11044, 'Icon of the "run all tests with coverage" action.')));
|
|
19
|
+
const testingCancelIcon = registerIcon('testing-cancel-icon', Codicon.debugStop, ( localize(11045, 'Icon to cancel ongoing test runs.')));
|
|
20
|
+
const testingFilterIcon = registerIcon('testing-filter', Codicon.filter, ( localize(11046, 'Icon for the \'Filter\' action in the testing view.')));
|
|
21
|
+
const testingHiddenIcon = registerIcon('testing-hidden', Codicon.eyeClosed, ( localize(11047, 'Icon shown beside hidden tests, when they\'ve been shown.')));
|
|
22
|
+
registerIcon('testing-show-as-list-icon', Codicon.listTree, ( localize(11048, 'Icon shown when the test explorer is disabled as a tree.')));
|
|
23
|
+
registerIcon('testing-show-as-list-icon', Codicon.listFlat, ( localize(11049, 'Icon shown when the test explorer is disabled as a list.')));
|
|
24
|
+
const testingUpdateProfiles = registerIcon('testing-update-profiles', Codicon.gear, ( localize(11050, 'Icon shown to update test profiles.')));
|
|
25
|
+
const testingRefreshTests = registerIcon('testing-refresh-tests', Codicon.refresh, ( localize(11051, 'Icon on the button to refresh tests.')));
|
|
26
|
+
const testingTurnContinuousRunOn = registerIcon('testing-turn-continuous-run-on', Codicon.eye, ( localize(11052, 'Icon to turn continuous test runs on.')));
|
|
27
|
+
const testingTurnContinuousRunOff = registerIcon('testing-turn-continuous-run-off', Codicon.eyeClosed, ( localize(11053, 'Icon to turn continuous test runs off.')));
|
|
28
|
+
const testingContinuousIsOn = registerIcon('testing-continuous-is-on', Codicon.eye, ( localize(11054, 'Icon when continuous run is on for a test ite,.')));
|
|
29
|
+
const testingCancelRefreshTests = registerIcon('testing-cancel-refresh-tests', Codicon.stop, ( localize(11055, 'Icon on the button to cancel refreshing tests.')));
|
|
30
|
+
const testingCoverageReport = registerIcon('testing-coverage', Codicon.coverage, ( localize(11056, 'Icon representing test coverage')));
|
|
31
|
+
const testingWasCovered = registerIcon('testing-was-covered', Codicon.check, ( localize(11057, 'Icon representing that an element was covered')));
|
|
32
|
+
const testingCoverageMissingBranch = registerIcon('testing-missing-branch', Codicon.question, ( localize(11058, 'Icon representing a uncovered block without a range')));
|
|
33
33
|
const testingStatesToIcons = ( new Map([
|
|
34
|
-
[TestResultState.Errored, registerIcon('testing-error-icon', Codicon.issues, ( localize(
|
|
35
|
-
[TestResultState.Failed, registerIcon('testing-failed-icon', Codicon.error, ( localize(
|
|
36
|
-
[TestResultState.Passed, registerIcon('testing-passed-icon', Codicon.pass, ( localize(
|
|
37
|
-
[TestResultState.Queued, registerIcon('testing-queued-icon', Codicon.history, ( localize(
|
|
34
|
+
[TestResultState.Errored, registerIcon('testing-error-icon', Codicon.issues, ( localize(11059, 'Icon shown for tests that have an error.')))],
|
|
35
|
+
[TestResultState.Failed, registerIcon('testing-failed-icon', Codicon.error, ( localize(11060, 'Icon shown for tests that failed.')))],
|
|
36
|
+
[TestResultState.Passed, registerIcon('testing-passed-icon', Codicon.pass, ( localize(11061, 'Icon shown for tests that passed.')))],
|
|
37
|
+
[TestResultState.Queued, registerIcon('testing-queued-icon', Codicon.history, ( localize(11062, 'Icon shown for tests that are queued.')))],
|
|
38
38
|
[TestResultState.Running, spinningLoading],
|
|
39
|
-
[TestResultState.Skipped, registerIcon('testing-skipped-icon', Codicon.debugStepOver, ( localize(
|
|
40
|
-
[TestResultState.Unset, registerIcon('testing-unset-icon', Codicon.circleOutline, ( localize(
|
|
39
|
+
[TestResultState.Skipped, registerIcon('testing-skipped-icon', Codicon.debugStepOver, ( localize(11063, 'Icon shown for tests that are skipped.')))],
|
|
40
|
+
[TestResultState.Unset, registerIcon('testing-unset-icon', Codicon.circleOutline, ( localize(11064, 'Icon shown for tests that are in an unset state.')))],
|
|
41
41
|
]));
|
|
42
42
|
registerThemingParticipant((theme, collector) => {
|
|
43
43
|
for (const [state, icon] of testingStatesToIcons.entries()) {
|
|
@@ -3,7 +3,7 @@ import { ITransaction } from "@codingame/monaco-vscode-api/vscode/vs/base/common
|
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
5
|
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
6
|
-
import { IExplorerFileContribution } from "@codingame/monaco-vscode-
|
|
6
|
+
import { IExplorerFileContribution } from "@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common/vscode/vs/workbench/contrib/files/browser/explorerFileContrib";
|
|
7
7
|
import { AbstractFileCoverage } from "@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common/vscode/vs/workbench/contrib/testing/common/testCoverage";
|
|
8
8
|
import { ITestCoverageService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testCoverageService.service";
|
|
9
9
|
export interface TestCoverageBarsOptions {
|
|
@@ -11,12 +11,13 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
11
11
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
12
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
13
13
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
14
|
-
import { ExplorerExtensions } from '@codingame/monaco-vscode-
|
|
14
|
+
import { ExplorerExtensions } from '@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common/vscode/vs/workbench/contrib/files/browser/explorerFileContrib';
|
|
15
15
|
import { calculateDisplayedStat, displayPercent, percent, getCoverageColor } from './codeCoverageDisplayUtils.js';
|
|
16
16
|
import { TestingConfigKeys, getTestingConfiguration, observeTestingConfiguration } from '../common/configuration.js';
|
|
17
17
|
import { ITestCoverageService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testCoverageService.service';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { safeIntl } from '@codingame/monaco-vscode-api/vscode/vs/base/common/date';
|
|
19
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
20
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
20
21
|
|
|
21
22
|
var ExplorerTestCoverageBars_1;
|
|
22
23
|
let ManagedTestCoverageBars = class ManagedTestCoverageBars extends Disposable {
|
|
@@ -124,26 +125,26 @@ const renderBar = (bar, pct, isZero, thresholds) => {
|
|
|
124
125
|
bar.style.color = getCoverageColor(pct, thresholds);
|
|
125
126
|
bar.style.opacity = '1';
|
|
126
127
|
};
|
|
127
|
-
const nf =
|
|
128
|
+
const nf = safeIntl.NumberFormat();
|
|
128
129
|
const stmtCoverageText = (coverage) => ( localize(
|
|
129
|
-
|
|
130
|
+
11065,
|
|
130
131
|
'{0}/{1} statements covered ({2})',
|
|
131
|
-
nf.format(coverage.statement.covered),
|
|
132
|
-
nf.format(coverage.statement.total),
|
|
132
|
+
nf.value.format(coverage.statement.covered),
|
|
133
|
+
nf.value.format(coverage.statement.total),
|
|
133
134
|
displayPercent(percent(coverage.statement))
|
|
134
135
|
));
|
|
135
136
|
const fnCoverageText = (coverage) => coverage.declaration && ( localize(
|
|
136
|
-
|
|
137
|
+
11066,
|
|
137
138
|
'{0}/{1} functions covered ({2})',
|
|
138
|
-
nf.format(coverage.declaration.covered),
|
|
139
|
-
nf.format(coverage.declaration.total),
|
|
139
|
+
nf.value.format(coverage.declaration.covered),
|
|
140
|
+
nf.value.format(coverage.declaration.total),
|
|
140
141
|
displayPercent(percent(coverage.declaration))
|
|
141
142
|
));
|
|
142
143
|
const branchCoverageText = (coverage) => coverage.branch && ( localize(
|
|
143
|
-
|
|
144
|
+
11067,
|
|
144
145
|
'{0}/{1} branches covered ({2})',
|
|
145
|
-
nf.format(coverage.branch.covered),
|
|
146
|
-
nf.format(coverage.branch.total),
|
|
146
|
+
nf.value.format(coverage.branch.covered),
|
|
147
|
+
nf.value.format(coverage.branch.total),
|
|
147
148
|
displayPercent(percent(coverage.branch))
|
|
148
149
|
));
|
|
149
150
|
const getOverallHoverText = (coverage) => {
|
|
@@ -6,7 +6,7 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
6
6
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
7
7
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
8
8
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
9
|
-
import { IViewPaneOptions, ViewPane } from "@codingame/monaco-vscode-
|
|
9
|
+
import { IViewPaneOptions, ViewPane } from "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
10
10
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
11
11
|
import { ITestCoverageService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testCoverageService.service";
|
|
12
12
|
declare enum CoverageSortOrder {
|
|
@@ -34,8 +34,8 @@ import { WorkbenchCompressibleObjectTree } from '@codingame/monaco-vscode-api/vs
|
|
|
34
34
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
35
35
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
36
36
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
37
|
-
import { ResourceLabels } from '@codingame/monaco-vscode-
|
|
38
|
-
import { ViewPane, ViewAction } from '@codingame/monaco-vscode-
|
|
37
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-f24b7f0a-ceeb-5877-9148-81eb98a4f5d7-common/vscode/vs/workbench/browser/labels';
|
|
38
|
+
import { ViewPane, ViewAction } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
39
39
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
40
40
|
import { SIDE_GROUP, ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
41
41
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -49,8 +49,8 @@ import { DetailType, TestResultState } from '@codingame/monaco-vscode-api/vscode
|
|
|
49
49
|
import { labels, getLabelForItem } from './codeCoverageDisplayUtils.js';
|
|
50
50
|
import { testingWasCovered, testingStatesToIcons } from './icons.js';
|
|
51
51
|
import { ManagedTestCoverageBars } from './testCoverageBars.js';
|
|
52
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
|
|
53
|
-
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/
|
|
52
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
53
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
54
54
|
|
|
55
55
|
var CurrentlyFilteredToRenderer_1, FileCoverageRenderer_1, DeclarationCoverageRenderer_1;
|
|
56
56
|
var CoverageSortOrder;
|
|
@@ -158,7 +158,7 @@ DeclarationCoverageNode.__decorator = ( __decorate([
|
|
|
158
158
|
], DeclarationCoverageNode.prototype, "attributableCoverage", null));
|
|
159
159
|
class RevealUncoveredDeclarations {
|
|
160
160
|
get label() {
|
|
161
|
-
return localize(
|
|
161
|
+
return localize(11068, "{0} declarations without coverage...", this.n);
|
|
162
162
|
}
|
|
163
163
|
constructor(n) {
|
|
164
164
|
this.n = n;
|
|
@@ -167,7 +167,7 @@ class RevealUncoveredDeclarations {
|
|
|
167
167
|
}
|
|
168
168
|
class CurrentlyFilteredTo {
|
|
169
169
|
get label() {
|
|
170
|
-
return localize(
|
|
170
|
+
return localize(11069, "Showing coverage for \"{0}\"", this.testItem.label);
|
|
171
171
|
}
|
|
172
172
|
constructor(testItem) {
|
|
173
173
|
this.testItem = testItem;
|
|
@@ -177,7 +177,7 @@ class CurrentlyFilteredTo {
|
|
|
177
177
|
class LoadingDetails {
|
|
178
178
|
constructor() {
|
|
179
179
|
this.id = String(fnNodeId++);
|
|
180
|
-
this.label = ( localize(
|
|
180
|
+
this.label = ( localize(11070, "Loading Coverage Details..."));
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
const isFileCoverage = (c) => typeof c === 'object' && 'value' in c;
|
|
@@ -210,14 +210,14 @@ let TestCoverageTree = class TestCoverageTree extends Disposable {
|
|
|
210
210
|
getAriaLabel(element) {
|
|
211
211
|
if (isFileCoverage(element)) {
|
|
212
212
|
const name = basenameOrAuthority(element.value.uri);
|
|
213
|
-
return localize(
|
|
213
|
+
return localize(11071, "{0} coverage: {0}%", name, (element.value.tpc * 100).toFixed(2));
|
|
214
214
|
}
|
|
215
215
|
else {
|
|
216
216
|
return element.label;
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
getWidgetAriaLabel() {
|
|
220
|
-
return localize(
|
|
220
|
+
return localize(11072, "Test Coverage Explorer");
|
|
221
221
|
}
|
|
222
222
|
},
|
|
223
223
|
identityProvider: ( new TestCoverageIdentityProvider()),
|
|
@@ -409,7 +409,7 @@ let CurrentlyFilteredToRenderer = class CurrentlyFilteredToRenderer {
|
|
|
409
409
|
this.contextKeyService = contextKeyService;
|
|
410
410
|
this.templateId = CurrentlyFilteredToRenderer_1.ID;
|
|
411
411
|
}
|
|
412
|
-
renderCompressedElements(node, index, templateData
|
|
412
|
+
renderCompressedElements(node, index, templateData) {
|
|
413
413
|
this.renderInner(node.element.elements[node.element.elements.length - 1], templateData);
|
|
414
414
|
}
|
|
415
415
|
renderTemplate(container) {
|
|
@@ -423,7 +423,7 @@ let CurrentlyFilteredToRenderer = class CurrentlyFilteredToRenderer {
|
|
|
423
423
|
actions.domNode.style.display = 'block';
|
|
424
424
|
return { label, actions };
|
|
425
425
|
}
|
|
426
|
-
renderElement(element, index, templateData
|
|
426
|
+
renderElement(element, index, templateData) {
|
|
427
427
|
this.renderInner(element.element, templateData);
|
|
428
428
|
}
|
|
429
429
|
disposeTemplate(templateData) {
|
|
@@ -568,7 +568,7 @@ registerAction2(class TestCoverageChangePerTestFilterAction extends Action2 {
|
|
|
568
568
|
super({
|
|
569
569
|
id: TestCommandId.CoverageFilterToTest,
|
|
570
570
|
category: Categories.Test,
|
|
571
|
-
title: ( localize2(
|
|
571
|
+
title: ( localize2(11073, 'Filter Coverage by Test')),
|
|
572
572
|
icon: Codicon.filter,
|
|
573
573
|
toggled: {
|
|
574
574
|
icon: Codicon.filterFilled,
|
|
@@ -620,7 +620,7 @@ registerAction2(class TestCoverageChangeSortingAction extends ViewAction {
|
|
|
620
620
|
super({
|
|
621
621
|
id: TestCommandId.CoverageViewChangeSorting,
|
|
622
622
|
viewId: Testing.CoverageViewId,
|
|
623
|
-
title: ( localize2(
|
|
623
|
+
title: ( localize2(11074, 'Change Sort Order')),
|
|
624
624
|
icon: Codicon.sortPrecedence,
|
|
625
625
|
menu: {
|
|
626
626
|
id: MenuId.ViewTitle,
|
|
@@ -633,14 +633,14 @@ registerAction2(class TestCoverageChangeSortingAction extends ViewAction {
|
|
|
633
633
|
const disposables = ( new DisposableStore());
|
|
634
634
|
const quickInput = disposables.add(accessor.get(IQuickInputService).createQuickPick());
|
|
635
635
|
const items = [
|
|
636
|
-
{ label: ( localize(
|
|
637
|
-
|
|
636
|
+
{ label: ( localize(11075, 'Sort by Location')), value: CoverageSortOrder.Location, description: ( localize(
|
|
637
|
+
11076,
|
|
638
638
|
'Files are sorted alphabetically, declarations are sorted by position'
|
|
639
639
|
)) },
|
|
640
|
-
{ label: ( localize(
|
|
641
|
-
{ label: ( localize(
|
|
640
|
+
{ label: ( localize(11077, 'Sort by Coverage')), value: CoverageSortOrder.Coverage, description: ( localize(11078, 'Files and declarations are sorted by total coverage')) },
|
|
641
|
+
{ label: ( localize(11079, 'Sort by Name')), value: CoverageSortOrder.Name, description: ( localize(11080, 'Files and declarations are sorted alphabetically')) },
|
|
642
642
|
];
|
|
643
|
-
quickInput.placeholder = ( localize(
|
|
643
|
+
quickInput.placeholder = ( localize(11081, 'Sort the Test Coverage view...'));
|
|
644
644
|
quickInput.items = items;
|
|
645
645
|
quickInput.show();
|
|
646
646
|
disposables.add(quickInput.onDidHide(() => disposables.dispose()));
|
|
@@ -10,7 +10,7 @@ import { Action2, IAction2Options } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
10
10
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
11
11
|
import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
|
|
12
12
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
13
|
-
import { ViewAction } from "@codingame/monaco-vscode-
|
|
13
|
+
import { ViewAction } from "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
14
14
|
import { TestExplorerTreeElement, TestItemTreeElement } from "./explorerProjections/index.js";
|
|
15
15
|
import { TestingExplorerView } from "./testingExplorerView.js";
|
|
16
16
|
import { ITestResult } from "@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common/vscode/vs/workbench/contrib/testing/common/testResult";
|