@codingame/monaco-vscode-testing-service-override 24.3.0 → 25.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 +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackWidget.js +8 -7
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +44 -37
- 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.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageView.js +13 -13
- package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.js +72 -72
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.js +5 -5
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.js +24 -24
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/browser/testing.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/testing/browser/testingConfigurationUi.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/browser/testingDecorations.js +20 -20
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +14 -14
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/theme.js +32 -32
- package/vscode/src/vs/workbench/contrib/testing/common/configuration.js +36 -36
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +31 -31
- package/vscode/src/vs/workbench/contrib/testing/common/testingProgressMessages.js +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-testing-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - testing service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-terminal-service-override": "
|
|
20
|
-
"@codingame/monaco-vscode-xterm-addons-common": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "25.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-terminal-service-override": "25.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-xterm-addons-common": "25.0.0"
|
|
21
21
|
},
|
|
22
22
|
"main": "index.js",
|
|
23
23
|
"module": "index.js",
|
|
@@ -113,8 +113,9 @@ let CallStackWidget = class CallStackWidget extends Disposable {
|
|
|
113
113
|
}
|
|
114
114
|
setFrames(frames) {
|
|
115
115
|
this.currentFramesDs.clear();
|
|
116
|
-
|
|
117
|
-
this.
|
|
116
|
+
const cts = ( new CancellationTokenSource());
|
|
117
|
+
this.currentFramesDs.add(toDisposable(() => cts.dispose(true)));
|
|
118
|
+
this.cts = cts;
|
|
118
119
|
this.list.splice(0, this.list.length, this.mapFrames(frames));
|
|
119
120
|
}
|
|
120
121
|
layout(height, width) {
|
|
@@ -180,7 +181,7 @@ let StackAccessibilityProvider = class StackAccessibilityProvider {
|
|
|
180
181
|
if (e instanceof CallStackFrame) {
|
|
181
182
|
if (e.source && e.line) {
|
|
182
183
|
return localize(
|
|
183
|
-
|
|
184
|
+
6583,
|
|
184
185
|
'{0}, line {1} in {2}',
|
|
185
186
|
e.name,
|
|
186
187
|
e.line,
|
|
@@ -192,7 +193,7 @@ let StackAccessibilityProvider = class StackAccessibilityProvider {
|
|
|
192
193
|
assertNever();
|
|
193
194
|
}
|
|
194
195
|
getWidgetAriaLabel() {
|
|
195
|
-
return localize(
|
|
196
|
+
return localize(6584, 'Stack Trace');
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
199
|
StackAccessibilityProvider = ( __decorate([
|
|
@@ -412,7 +413,7 @@ let MissingCodeRenderer = class MissingCodeRenderer {
|
|
|
412
413
|
const cast = element;
|
|
413
414
|
templateData.label.element.setResource({
|
|
414
415
|
name: cast.name,
|
|
415
|
-
description: ( localize(
|
|
416
|
+
description: ( localize(6585, 'Line {0} column {1}', cast.line, cast.column)),
|
|
416
417
|
range: { startLineNumber: cast.line, startColumn: cast.column, endColumn: cast.column, endLineNumber: cast.line },
|
|
417
418
|
}, {
|
|
418
419
|
icon: Codicon.fileBinary,
|
|
@@ -473,7 +474,7 @@ let SkippedRenderer = class SkippedRenderer {
|
|
|
473
474
|
}
|
|
474
475
|
button.enabled = false;
|
|
475
476
|
this.loadFrames(data.current).catch(e => {
|
|
476
|
-
this.notificationService.error(( localize(
|
|
477
|
+
this.notificationService.error(( localize(6586, 'Failed to load stack frames: {0}', e.message)));
|
|
477
478
|
});
|
|
478
479
|
}));
|
|
479
480
|
return data;
|
|
@@ -550,7 +551,7 @@ registerAction2(class extends Action2 {
|
|
|
550
551
|
constructor() {
|
|
551
552
|
super({
|
|
552
553
|
id: 'callStackWidget.goToFile',
|
|
553
|
-
title: ( localize2(
|
|
554
|
+
title: ( localize2(6587, 'Open File')),
|
|
554
555
|
icon: Codicon.goToFile,
|
|
555
556
|
menu: {
|
|
556
557
|
id: MenuId.DebugCallStackToolbar,
|
|
@@ -56,11 +56,11 @@ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/obse
|
|
|
56
56
|
|
|
57
57
|
const CLASS_HIT = 'coverage-deco-hit';
|
|
58
58
|
const CLASS_MISS = 'coverage-deco-miss';
|
|
59
|
-
const TOGGLE_INLINE_COMMAND_TEXT = ( localize(
|
|
59
|
+
const TOGGLE_INLINE_COMMAND_TEXT = ( localize(12401, 'Toggle Inline'));
|
|
60
60
|
const TOGGLE_INLINE_COMMAND_ID = 'testing.toggleInlineCoverage';
|
|
61
61
|
const BRANCH_MISS_INDICATOR_CHARS = 4;
|
|
62
|
-
const GO_TO_NEXT_MISSED_LINE_TITLE = ( localize2(
|
|
63
|
-
const GO_TO_PREVIOUS_MISSED_LINE_TITLE = ( localize2(
|
|
62
|
+
const GO_TO_NEXT_MISSED_LINE_TITLE = ( localize2(12402, "Go to Next Uncovered Line"));
|
|
63
|
+
const GO_TO_PREVIOUS_MISSED_LINE_TITLE = ( localize2(12403, "Go to Previous Uncovered Line"));
|
|
64
64
|
let CodeCoverageDecorations = class CodeCoverageDecorations extends Disposable {
|
|
65
65
|
static { this.ID = Testing.CoverageDecorationsContributionId; }
|
|
66
66
|
constructor(editor, instantiationService, coverage, configurationService, log, contextKeyService) {
|
|
@@ -442,7 +442,7 @@ class CoverageDetailsModel {
|
|
|
442
442
|
if (detail.branches?.length) {
|
|
443
443
|
const covered = detail.branches.filter(b => !!b.count).length;
|
|
444
444
|
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
445
|
-
|
|
445
|
+
12404,
|
|
446
446
|
'{0} of {1} of branches in {2} were covered.',
|
|
447
447
|
covered,
|
|
448
448
|
detail.branches.length,
|
|
@@ -458,13 +458,13 @@ class CoverageDetailsModel {
|
|
|
458
458
|
const { count, label } = detail.detail.branches[detail.branch];
|
|
459
459
|
const label2 = label ? wrapInBackticks(label) : `#${detail.branch + 1}`;
|
|
460
460
|
if (!count) {
|
|
461
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
461
|
+
return ( new MarkdownString()).appendMarkdown(( localize(12405, 'Branch {0} in {1} was not covered.', label2, text)));
|
|
462
462
|
}
|
|
463
463
|
else if (count === true) {
|
|
464
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
464
|
+
return ( new MarkdownString()).appendMarkdown(( localize(12406, 'Branch {0} in {1} was executed.', label2, text)));
|
|
465
465
|
}
|
|
466
466
|
else {
|
|
467
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
467
|
+
return ( new MarkdownString()).appendMarkdown(( localize(12407, 'Branch {0} in {1} was executed {2} time(s).', label2, text, count)));
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
assertNever();
|
|
@@ -472,10 +472,10 @@ class CoverageDetailsModel {
|
|
|
472
472
|
}
|
|
473
473
|
function namedDetailLabel(name, detail) {
|
|
474
474
|
return ( new MarkdownString()).appendMarkdown(!detail.count
|
|
475
|
-
? ( localize(
|
|
475
|
+
? ( localize(12408, '`{0}` was not executed.', name))
|
|
476
476
|
: typeof detail.count === 'number'
|
|
477
|
-
? ( localize(
|
|
478
|
-
: ( localize(
|
|
477
|
+
? ( localize(12409, '`{0}` was executed {1} time(s).', name, detail.count))
|
|
478
|
+
: ( localize(12410, '`{0}` was executed.', name)));
|
|
479
479
|
}
|
|
480
480
|
function tidyLocation(location) {
|
|
481
481
|
if (location instanceof Position) {
|
|
@@ -519,11 +519,16 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
519
519
|
this.actionBar = this._register(instaService.createInstance(ActionBar, this._domNode.toolbar, {
|
|
520
520
|
orientation: ActionsOrientation.HORIZONTAL,
|
|
521
521
|
actionViewItemProvider: (action, options) => {
|
|
522
|
-
const vm = ( new CodiconActionViewItem(undefined, action, options));
|
|
523
522
|
if (action instanceof ActionWithIcon) {
|
|
523
|
+
if (action.iconOnly) {
|
|
524
|
+
action.class = ThemeIcon.asClassName(action.icon);
|
|
525
|
+
return ( new ActionViewItem(undefined, action, { ...options, label: false, icon: true }));
|
|
526
|
+
}
|
|
527
|
+
const vm = ( new CodiconActionViewItem(undefined, action, options));
|
|
524
528
|
vm.themeIcon = action.icon;
|
|
529
|
+
return vm;
|
|
525
530
|
}
|
|
526
|
-
return
|
|
531
|
+
return undefined;
|
|
527
532
|
}
|
|
528
533
|
}));
|
|
529
534
|
this._register(autorun(reader => {
|
|
@@ -572,27 +577,30 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
572
577
|
return;
|
|
573
578
|
}
|
|
574
579
|
const toggleAction = ( new ActionWithIcon('toggleInline', this.coverage.showInline.get()
|
|
575
|
-
? ( localize(
|
|
576
|
-
: ( localize(
|
|
580
|
+
? ( localize(12411, 'Hide Inline'))
|
|
581
|
+
: ( localize(12412, 'Show Inline')), testingCoverageReport, undefined, () => this.coverage.showInline.set(!this.coverage.showInline.get(), undefined)));
|
|
577
582
|
const kb = this.keybindingService.lookupKeybinding(TOGGLE_INLINE_COMMAND_ID);
|
|
578
583
|
if (kb) {
|
|
579
584
|
toggleAction.tooltip = `${TOGGLE_INLINE_COMMAND_TEXT} (${kb.getLabel()})`;
|
|
580
585
|
}
|
|
581
|
-
|
|
586
|
+
const hasUncoveredStmt = current.coverage.statement.covered < current.coverage.statement.total;
|
|
582
587
|
this.actionBar.push(( new ActionWithIcon(
|
|
583
588
|
'goToPreviousMissed',
|
|
584
589
|
GO_TO_PREVIOUS_MISSED_LINE_TITLE.value,
|
|
585
590
|
Codicon.arrowUp,
|
|
586
|
-
|
|
587
|
-
() => this.commandService.executeCommand(TestCommandId.CoverageGoToPreviousMissedLine)
|
|
591
|
+
hasUncoveredStmt,
|
|
592
|
+
() => this.commandService.executeCommand(TestCommandId.CoverageGoToPreviousMissedLine),
|
|
593
|
+
true
|
|
588
594
|
)));
|
|
589
595
|
this.actionBar.push(( new ActionWithIcon(
|
|
590
596
|
'goToNextMissed',
|
|
591
597
|
GO_TO_NEXT_MISSED_LINE_TITLE.value,
|
|
592
598
|
Codicon.arrowDown,
|
|
593
|
-
|
|
594
|
-
() => this.commandService.executeCommand(TestCommandId.CoverageGoToNextMissedLine)
|
|
599
|
+
hasUncoveredStmt,
|
|
600
|
+
() => this.commandService.executeCommand(TestCommandId.CoverageGoToNextMissedLine),
|
|
601
|
+
true
|
|
595
602
|
)));
|
|
603
|
+
this.actionBar.push(toggleAction);
|
|
596
604
|
if (current.testId) {
|
|
597
605
|
const testItem = current.coverage.fromResult.getTestById(( current.testId.toString()));
|
|
598
606
|
assert(!!testItem, 'got coverage for an unreported test');
|
|
@@ -606,12 +614,12 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
606
614
|
}
|
|
607
615
|
else if (current.coverage.perTestData?.size) {
|
|
608
616
|
this.actionBar.push(( new ActionWithIcon('perTestFilter', ( localize(
|
|
609
|
-
|
|
617
|
+
12413,
|
|
610
618
|
"{0} test(s) ran code in this file",
|
|
611
619
|
current.coverage.perTestData.size
|
|
612
620
|
)), testingFilterIcon, undefined, () => this.commandService.executeCommand(TestCommandId.CoverageFilterToTestInEditor, this.current, this.editor))));
|
|
613
621
|
}
|
|
614
|
-
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(
|
|
622
|
+
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(12414, 'Rerun')), testingRerunIcon, !this.isRunning, () => this.rerunTest())));
|
|
615
623
|
}
|
|
616
624
|
show() {
|
|
617
625
|
if (this.registered) {
|
|
@@ -671,7 +679,7 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
671
679
|
constructor() {
|
|
672
680
|
super({
|
|
673
681
|
id: TOGGLE_INLINE_COMMAND_ID,
|
|
674
|
-
title: ( localize2(
|
|
682
|
+
title: ( localize2(12415, "Toggle Inline Coverage")),
|
|
675
683
|
category: Categories.Test,
|
|
676
684
|
keybinding: {
|
|
677
685
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -679,7 +687,7 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
679
687
|
},
|
|
680
688
|
toggled: {
|
|
681
689
|
condition: TestingContextKeys.inlineCoverageEnabled,
|
|
682
|
-
title: ( localize(
|
|
690
|
+
title: ( localize(12416, "Hide Inline Coverage")),
|
|
683
691
|
},
|
|
684
692
|
icon: testingCoverageReport,
|
|
685
693
|
menu: [
|
|
@@ -697,9 +705,9 @@ registerAction2(class ToggleCoverageToolbar extends Action2 {
|
|
|
697
705
|
constructor() {
|
|
698
706
|
super({
|
|
699
707
|
id: TestCommandId.CoverageToggleToolbar,
|
|
700
|
-
title: ( localize2(
|
|
708
|
+
title: ( localize2(12417, "Show Test Coverage Toolbar")),
|
|
701
709
|
metadata: {
|
|
702
|
-
description: ( localize2(
|
|
710
|
+
description: ( localize2(12418, 'Toggle the sticky coverage bar in the editor.'))
|
|
703
711
|
},
|
|
704
712
|
category: Categories.Test,
|
|
705
713
|
toggled: {
|
|
@@ -708,7 +716,7 @@ registerAction2(class ToggleCoverageToolbar extends Action2 {
|
|
|
708
716
|
menu: [
|
|
709
717
|
{ id: MenuId.CommandPalette, when: TestingContextKeys.isTestCoverageOpen },
|
|
710
718
|
{ id: MenuId.StickyScrollContext, when: TestingContextKeys.isTestCoverageOpen },
|
|
711
|
-
{ id: MenuId.EditorTitle, when: TestingContextKeys.hasCoverageInFile, group: 'coverage
|
|
719
|
+
{ id: MenuId.EditorTitle, when: TestingContextKeys.hasCoverageInFile, group: 'coverage', order: 1 },
|
|
712
720
|
]
|
|
713
721
|
});
|
|
714
722
|
}
|
|
@@ -722,7 +730,7 @@ registerAction2(class FilterCoverageToTestInEditor extends Action2 {
|
|
|
722
730
|
constructor() {
|
|
723
731
|
super({
|
|
724
732
|
id: TestCommandId.CoverageFilterToTestInEditor,
|
|
725
|
-
title: ( localize2(
|
|
733
|
+
title: ( localize2(12419, "Filter Coverage to Test")),
|
|
726
734
|
category: Categories.Test,
|
|
727
735
|
icon: Codicon.filter,
|
|
728
736
|
toggled: {
|
|
@@ -810,14 +818,14 @@ registerAction2(class ToggleCoverageInExplorer extends Action2 {
|
|
|
810
818
|
constructor() {
|
|
811
819
|
super({
|
|
812
820
|
id: TestCommandId.CoverageToggleInExplorer,
|
|
813
|
-
title: ( localize2(
|
|
821
|
+
title: ( localize2(12420, "Toggle Coverage in Explorer")),
|
|
814
822
|
metadata: {
|
|
815
|
-
description: ( localize2(
|
|
823
|
+
description: ( localize2(12421, 'Toggle the display of test coverage in the File Explorer view.'))
|
|
816
824
|
},
|
|
817
825
|
category: Categories.Test,
|
|
818
826
|
toggled: {
|
|
819
827
|
condition: ( ContextKeyExpr.equals('config.testing.showCoverageInExplorer', true)),
|
|
820
|
-
title: ( localize(
|
|
828
|
+
title: ( localize(12422, "Hide Coverage in Explorer")),
|
|
821
829
|
},
|
|
822
830
|
menu: [
|
|
823
831
|
{ id: MenuId.CommandPalette, when: TestingContextKeys.isTestCoverageOpen },
|
|
@@ -836,11 +844,10 @@ registerAction2(class GoToNextMissedCoverageLine extends Action2 {
|
|
|
836
844
|
id: TestCommandId.CoverageGoToNextMissedLine,
|
|
837
845
|
title: GO_TO_NEXT_MISSED_LINE_TITLE,
|
|
838
846
|
metadata: {
|
|
839
|
-
description: ( localize2(
|
|
847
|
+
description: ( localize2(12423, 'Navigate to the next line that is not covered by tests.'))
|
|
840
848
|
},
|
|
841
849
|
category: Categories.Test,
|
|
842
850
|
icon: Codicon.arrowDown,
|
|
843
|
-
f1: true,
|
|
844
851
|
precondition: TestingContextKeys.hasCoverageInFile,
|
|
845
852
|
keybinding: {
|
|
846
853
|
when: ActiveEditorContext,
|
|
@@ -849,7 +856,7 @@ registerAction2(class GoToNextMissedCoverageLine extends Action2 {
|
|
|
849
856
|
},
|
|
850
857
|
menu: [
|
|
851
858
|
{ id: MenuId.CommandPalette, when: TestingContextKeys.isTestCoverageOpen },
|
|
852
|
-
{ id: MenuId.EditorTitle, when: TestingContextKeys.hasCoverageInFile, group: 'coverage
|
|
859
|
+
{ id: MenuId.EditorTitle, when: TestingContextKeys.hasCoverageInFile, group: 'coverage', order: 2 },
|
|
853
860
|
]
|
|
854
861
|
});
|
|
855
862
|
}
|
|
@@ -869,11 +876,10 @@ registerAction2(class GoToPreviousMissedCoverageLine extends Action2 {
|
|
|
869
876
|
id: TestCommandId.CoverageGoToPreviousMissedLine,
|
|
870
877
|
title: GO_TO_PREVIOUS_MISSED_LINE_TITLE,
|
|
871
878
|
metadata: {
|
|
872
|
-
description: ( localize2(
|
|
879
|
+
description: ( localize2(12424, 'Navigate to the previous line that is not covered by tests.'))
|
|
873
880
|
},
|
|
874
881
|
category: Categories.Test,
|
|
875
882
|
icon: Codicon.arrowUp,
|
|
876
|
-
f1: true,
|
|
877
883
|
precondition: TestingContextKeys.hasCoverageInFile,
|
|
878
884
|
keybinding: {
|
|
879
885
|
when: ActiveEditorContext,
|
|
@@ -882,7 +888,7 @@ registerAction2(class GoToPreviousMissedCoverageLine extends Action2 {
|
|
|
882
888
|
},
|
|
883
889
|
menu: [
|
|
884
890
|
{ id: MenuId.CommandPalette, when: TestingContextKeys.isTestCoverageOpen },
|
|
885
|
-
{ id: MenuId.EditorTitle, when: TestingContextKeys.hasCoverageInFile, group: 'coverage
|
|
891
|
+
{ id: MenuId.EditorTitle, when: TestingContextKeys.hasCoverageInFile, group: 'coverage', order: 3 },
|
|
886
892
|
]
|
|
887
893
|
});
|
|
888
894
|
}
|
|
@@ -897,9 +903,10 @@ registerAction2(class GoToPreviousMissedCoverageLine extends Action2 {
|
|
|
897
903
|
}
|
|
898
904
|
});
|
|
899
905
|
class ActionWithIcon extends Action {
|
|
900
|
-
constructor(id, title, icon, enabled, run) {
|
|
906
|
+
constructor(id, title, icon, enabled, run, iconOnly = false) {
|
|
901
907
|
super(id, title, undefined, enabled, run);
|
|
902
908
|
this.icon = icon;
|
|
909
|
+
this.iconOnly = iconOnly;
|
|
903
910
|
}
|
|
904
911
|
}
|
|
905
912
|
class CodiconActionViewItem extends ActionViewItem {
|
|
@@ -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(12425, "Showing \"{0}\"", label));
|
|
79
|
+
labels.clickToChangeFiltering = ( localize(12426, 'Click to view coverage for a single test'));
|
|
80
|
+
labels.percentCoverage = (percent, precision) => ( localize(12427, '{0} Coverage', displayPercent(percent, precision)));
|
|
81
|
+
labels.allTests = ( localize(12428, 'All tests'));
|
|
82
|
+
labels.pickShowCoverage = ( localize(12429, '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(12430, 'View icon of the test view.')));
|
|
11
|
+
const testingResultsIcon = registerIcon('test-results-icon', Codicon.checklist, ( localize(12431, 'Icons for test results.')));
|
|
12
|
+
const testingRunIcon = registerIcon('testing-run-icon', Codicon.run, ( localize(12432, 'Icon of the "run test" action.')));
|
|
13
|
+
const testingRerunIcon = registerIcon('testing-rerun-icon', Codicon.debugRerun, ( localize(12433, 'Icon of the "rerun tests" action.')));
|
|
14
|
+
const testingRunAllIcon = registerIcon('testing-run-all-icon', Codicon.runAll, ( localize(12434, 'Icon of the "run all tests" action.')));
|
|
15
|
+
const testingDebugAllIcon = registerIcon('testing-debug-all-icon', Codicon.debugAltSmall, ( localize(12435, 'Icon of the "debug all tests" action.')));
|
|
16
|
+
const testingDebugIcon = registerIcon('testing-debug-icon', Codicon.debugAltSmall, ( localize(12436, 'Icon of the "debug test" action.')));
|
|
17
|
+
const testingCoverageIcon = registerIcon('testing-coverage-icon', Codicon.runCoverage, ( localize(12437, 'Icon of the "run test with coverage" action.')));
|
|
18
|
+
const testingCoverageAllIcon = registerIcon('testing-coverage-all-icon', Codicon.runAllCoverage, ( localize(12438, 'Icon of the "run all tests with coverage" action.')));
|
|
19
|
+
const testingCancelIcon = registerIcon('testing-cancel-icon', Codicon.debugStop, ( localize(12439, 'Icon to cancel ongoing test runs.')));
|
|
20
|
+
const testingFilterIcon = registerIcon('testing-filter', Codicon.filter, ( localize(12440, 'Icon for the \'Filter\' action in the testing view.')));
|
|
21
|
+
const testingHiddenIcon = registerIcon('testing-hidden', Codicon.eyeClosed, ( localize(12441, 'Icon shown beside hidden tests, when they\'ve been shown.')));
|
|
22
|
+
registerIcon('testing-show-as-list-icon', Codicon.listTree, ( localize(12442, 'Icon shown when the test explorer is disabled as a tree.')));
|
|
23
|
+
registerIcon('testing-show-as-list-icon', Codicon.listFlat, ( localize(12443, 'Icon shown when the test explorer is disabled as a list.')));
|
|
24
|
+
const testingUpdateProfiles = registerIcon('testing-update-profiles', Codicon.gear, ( localize(12444, 'Icon shown to update test profiles.')));
|
|
25
|
+
const testingRefreshTests = registerIcon('testing-refresh-tests', Codicon.refresh, ( localize(12445, 'Icon on the button to refresh tests.')));
|
|
26
|
+
const testingTurnContinuousRunOn = registerIcon('testing-turn-continuous-run-on', Codicon.eye, ( localize(12446, 'Icon to turn continuous test runs on.')));
|
|
27
|
+
const testingTurnContinuousRunOff = registerIcon('testing-turn-continuous-run-off', Codicon.eyeClosed, ( localize(12447, 'Icon to turn continuous test runs off.')));
|
|
28
|
+
const testingContinuousIsOn = registerIcon('testing-continuous-is-on', Codicon.eye, ( localize(12448, 'Icon when continuous run is on for a test ite,.')));
|
|
29
|
+
const testingCancelRefreshTests = registerIcon('testing-cancel-refresh-tests', Codicon.stop, ( localize(12449, 'Icon on the button to cancel refreshing tests.')));
|
|
30
|
+
const testingCoverageReport = registerIcon('testing-coverage', Codicon.coverage, ( localize(12450, 'Icon representing test coverage')));
|
|
31
|
+
const testingWasCovered = registerIcon('testing-was-covered', Codicon.check, ( localize(12451, 'Icon representing that an element was covered')));
|
|
32
|
+
const testingCoverageMissingBranch = registerIcon('testing-missing-branch', Codicon.question, ( localize(12452, '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(12453, 'Icon shown for tests that have an error.')))],
|
|
35
|
+
[TestResultState.Failed, registerIcon('testing-failed-icon', Codicon.error, ( localize(12454, 'Icon shown for tests that failed.')))],
|
|
36
|
+
[TestResultState.Passed, registerIcon('testing-passed-icon', Codicon.pass, ( localize(12455, 'Icon shown for tests that passed.')))],
|
|
37
|
+
[TestResultState.Queued, registerIcon('testing-queued-icon', Codicon.history, ( localize(12456, '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(12457, 'Icon shown for tests that are skipped.')))],
|
|
40
|
+
[TestResultState.Unset, registerIcon('testing-unset-icon', Codicon.circleOutline, ( localize(12458, '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()) {
|
|
@@ -127,21 +127,21 @@ const renderBar = (bar, pct, isZero, thresholds) => {
|
|
|
127
127
|
};
|
|
128
128
|
const nf = safeIntl.NumberFormat();
|
|
129
129
|
const stmtCoverageText = (coverage) => ( localize(
|
|
130
|
-
|
|
130
|
+
12459,
|
|
131
131
|
'{0}/{1} statements covered ({2})',
|
|
132
132
|
nf.value.format(coverage.statement.covered),
|
|
133
133
|
nf.value.format(coverage.statement.total),
|
|
134
134
|
displayPercent(percent(coverage.statement))
|
|
135
135
|
));
|
|
136
136
|
const fnCoverageText = (coverage) => coverage.declaration && ( localize(
|
|
137
|
-
|
|
137
|
+
12460,
|
|
138
138
|
'{0}/{1} functions covered ({2})',
|
|
139
139
|
nf.value.format(coverage.declaration.covered),
|
|
140
140
|
nf.value.format(coverage.declaration.total),
|
|
141
141
|
displayPercent(percent(coverage.declaration))
|
|
142
142
|
));
|
|
143
143
|
const branchCoverageText = (coverage) => coverage.branch && ( localize(
|
|
144
|
-
|
|
144
|
+
12461,
|
|
145
145
|
'{0}/{1} branches covered ({2})',
|
|
146
146
|
nf.value.format(coverage.branch.covered),
|
|
147
147
|
nf.value.format(coverage.branch.total),
|
|
@@ -161,7 +161,7 @@ DeclarationCoverageNode.__decorator = ( __decorate([
|
|
|
161
161
|
], DeclarationCoverageNode.prototype, "attributableCoverage", null));
|
|
162
162
|
class RevealUncoveredDeclarations {
|
|
163
163
|
get label() {
|
|
164
|
-
return localize(
|
|
164
|
+
return localize(12462, "{0} declarations without coverage...", this.n);
|
|
165
165
|
}
|
|
166
166
|
constructor(n) {
|
|
167
167
|
this.n = n;
|
|
@@ -170,7 +170,7 @@ class RevealUncoveredDeclarations {
|
|
|
170
170
|
}
|
|
171
171
|
class CurrentlyFilteredTo {
|
|
172
172
|
get label() {
|
|
173
|
-
return localize(
|
|
173
|
+
return localize(12463, "Showing coverage for \"{0}\"", this.testItem.label);
|
|
174
174
|
}
|
|
175
175
|
constructor(testItem) {
|
|
176
176
|
this.testItem = testItem;
|
|
@@ -180,7 +180,7 @@ class CurrentlyFilteredTo {
|
|
|
180
180
|
class LoadingDetails {
|
|
181
181
|
constructor() {
|
|
182
182
|
this.id = String(fnNodeId++);
|
|
183
|
-
this.label = ( localize(
|
|
183
|
+
this.label = ( localize(12464, "Loading Coverage Details..."));
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
const isFileCoverage = (c) => typeof c === 'object' && 'value' in c;
|
|
@@ -213,14 +213,14 @@ let TestCoverageTree = class TestCoverageTree extends Disposable {
|
|
|
213
213
|
getAriaLabel(element) {
|
|
214
214
|
if (isFileCoverage(element)) {
|
|
215
215
|
const name = basenameOrAuthority(element.value.uri);
|
|
216
|
-
return localize(
|
|
216
|
+
return localize(12465, "{0} coverage: {0}%", name, (element.value.tpc * 100).toFixed(2));
|
|
217
217
|
}
|
|
218
218
|
else {
|
|
219
219
|
return element.label;
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
getWidgetAriaLabel() {
|
|
223
|
-
return localize(
|
|
223
|
+
return localize(12466, "Test Coverage Explorer");
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
identityProvider: ( new TestCoverageIdentityProvider()),
|
|
@@ -574,7 +574,7 @@ registerAction2(class TestCoverageChangePerTestFilterAction extends Action2 {
|
|
|
574
574
|
super({
|
|
575
575
|
id: TestCommandId.CoverageFilterToTest,
|
|
576
576
|
category: Categories.Test,
|
|
577
|
-
title: ( localize2(
|
|
577
|
+
title: ( localize2(12467, 'Filter Coverage by Test')),
|
|
578
578
|
icon: Codicon.filter,
|
|
579
579
|
toggled: {
|
|
580
580
|
icon: Codicon.filterFilled,
|
|
@@ -626,7 +626,7 @@ registerAction2(class TestCoverageChangeSortingAction extends ViewAction {
|
|
|
626
626
|
super({
|
|
627
627
|
id: TestCommandId.CoverageViewChangeSorting,
|
|
628
628
|
viewId: Testing.CoverageViewId,
|
|
629
|
-
title: ( localize2(
|
|
629
|
+
title: ( localize2(12468, 'Change Sort Order')),
|
|
630
630
|
icon: Codicon.sortPrecedence,
|
|
631
631
|
menu: {
|
|
632
632
|
id: MenuId.ViewTitle,
|
|
@@ -640,14 +640,14 @@ registerAction2(class TestCoverageChangeSortingAction extends ViewAction {
|
|
|
640
640
|
const disposables = ( new DisposableStore());
|
|
641
641
|
const quickInput = disposables.add(accessor.get(IQuickInputService).createQuickPick());
|
|
642
642
|
const items = [
|
|
643
|
-
{ label: ( localize(
|
|
644
|
-
|
|
643
|
+
{ label: ( localize(12469, 'Sort by Location')), value: CoverageSortOrder.Location, description: ( localize(
|
|
644
|
+
12470,
|
|
645
645
|
'Files are sorted alphabetically, declarations are sorted by position'
|
|
646
646
|
)) },
|
|
647
|
-
{ label: ( localize(
|
|
648
|
-
{ label: ( localize(
|
|
647
|
+
{ label: ( localize(12471, 'Sort by Coverage')), value: CoverageSortOrder.Coverage, description: ( localize(12472, 'Files and declarations are sorted by total coverage')) },
|
|
648
|
+
{ label: ( localize(12473, 'Sort by Name')), value: CoverageSortOrder.Name, description: ( localize(12474, 'Files and declarations are sorted alphabetically')) },
|
|
649
649
|
];
|
|
650
|
-
quickInput.placeholder = ( localize(
|
|
650
|
+
quickInput.placeholder = ( localize(12475, 'Sort the Test Coverage view...'));
|
|
651
651
|
quickInput.items = items;
|
|
652
652
|
quickInput.show();
|
|
653
653
|
disposables.add(quickInput.onDidHide(() => disposables.dispose()));
|
|
@@ -665,7 +665,7 @@ registerAction2(class TestCoverageCollapseAllAction extends ViewAction {
|
|
|
665
665
|
super({
|
|
666
666
|
id: TestCommandId.CoverageViewCollapseAll,
|
|
667
667
|
viewId: Testing.CoverageViewId,
|
|
668
|
-
title: ( localize2(
|
|
668
|
+
title: ( localize2(12476, 'Collapse All Coverage')),
|
|
669
669
|
icon: Codicon.collapseAll,
|
|
670
670
|
menu: {
|
|
671
671
|
id: MenuId.ViewTitle,
|