@codingame/monaco-vscode-testing-service-override 25.0.0 → 25.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 +4 -4
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +24 -24
- 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 +19 -19
- 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.js +12 -12
- 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": "25.
|
|
3
|
+
"version": "25.1.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": "25.
|
|
19
|
-
"@codingame/monaco-vscode-terminal-service-override": "25.
|
|
20
|
-
"@codingame/monaco-vscode-xterm-addons-common": "25.
|
|
18
|
+
"@codingame/monaco-vscode-api": "25.1.0",
|
|
19
|
+
"@codingame/monaco-vscode-terminal-service-override": "25.1.0",
|
|
20
|
+
"@codingame/monaco-vscode-xterm-addons-common": "25.1.0"
|
|
21
21
|
},
|
|
22
22
|
"main": "index.js",
|
|
23
23
|
"module": "index.js",
|
|
@@ -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(12402, '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(12403, "Go to Next Uncovered Line"));
|
|
63
|
+
const GO_TO_PREVIOUS_MISSED_LINE_TITLE = ( localize2(12404, "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
|
+
12405,
|
|
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(12406, '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(12407, '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(12408, '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(12409, '`{0}` was not executed.', name))
|
|
476
476
|
: typeof detail.count === 'number'
|
|
477
|
-
? ( localize(
|
|
478
|
-
: ( localize(
|
|
477
|
+
? ( localize(12410, '`{0}` was executed {1} time(s).', name, detail.count))
|
|
478
|
+
: ( localize(12411, '`{0}` was executed.', name)));
|
|
479
479
|
}
|
|
480
480
|
function tidyLocation(location) {
|
|
481
481
|
if (location instanceof Position) {
|
|
@@ -577,8 +577,8 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
577
577
|
return;
|
|
578
578
|
}
|
|
579
579
|
const toggleAction = ( new ActionWithIcon('toggleInline', this.coverage.showInline.get()
|
|
580
|
-
? ( localize(
|
|
581
|
-
: ( localize(
|
|
580
|
+
? ( localize(12412, 'Hide Inline'))
|
|
581
|
+
: ( localize(12413, 'Show Inline')), testingCoverageReport, undefined, () => this.coverage.showInline.set(!this.coverage.showInline.get(), undefined)));
|
|
582
582
|
const kb = this.keybindingService.lookupKeybinding(TOGGLE_INLINE_COMMAND_ID);
|
|
583
583
|
if (kb) {
|
|
584
584
|
toggleAction.tooltip = `${TOGGLE_INLINE_COMMAND_TEXT} (${kb.getLabel()})`;
|
|
@@ -614,12 +614,12 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
614
614
|
}
|
|
615
615
|
else if (current.coverage.perTestData?.size) {
|
|
616
616
|
this.actionBar.push(( new ActionWithIcon('perTestFilter', ( localize(
|
|
617
|
-
|
|
617
|
+
12414,
|
|
618
618
|
"{0} test(s) ran code in this file",
|
|
619
619
|
current.coverage.perTestData.size
|
|
620
620
|
)), testingFilterIcon, undefined, () => this.commandService.executeCommand(TestCommandId.CoverageFilterToTestInEditor, this.current, this.editor))));
|
|
621
621
|
}
|
|
622
|
-
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(
|
|
622
|
+
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(12415, 'Rerun')), testingRerunIcon, !this.isRunning, () => this.rerunTest())));
|
|
623
623
|
}
|
|
624
624
|
show() {
|
|
625
625
|
if (this.registered) {
|
|
@@ -679,7 +679,7 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
679
679
|
constructor() {
|
|
680
680
|
super({
|
|
681
681
|
id: TOGGLE_INLINE_COMMAND_ID,
|
|
682
|
-
title: ( localize2(
|
|
682
|
+
title: ( localize2(12416, "Toggle Inline Coverage")),
|
|
683
683
|
category: Categories.Test,
|
|
684
684
|
keybinding: {
|
|
685
685
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -687,7 +687,7 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
687
687
|
},
|
|
688
688
|
toggled: {
|
|
689
689
|
condition: TestingContextKeys.inlineCoverageEnabled,
|
|
690
|
-
title: ( localize(
|
|
690
|
+
title: ( localize(12417, "Hide Inline Coverage")),
|
|
691
691
|
},
|
|
692
692
|
icon: testingCoverageReport,
|
|
693
693
|
menu: [
|
|
@@ -705,9 +705,9 @@ registerAction2(class ToggleCoverageToolbar extends Action2 {
|
|
|
705
705
|
constructor() {
|
|
706
706
|
super({
|
|
707
707
|
id: TestCommandId.CoverageToggleToolbar,
|
|
708
|
-
title: ( localize2(
|
|
708
|
+
title: ( localize2(12418, "Show Test Coverage Toolbar")),
|
|
709
709
|
metadata: {
|
|
710
|
-
description: ( localize2(
|
|
710
|
+
description: ( localize2(12419, 'Toggle the sticky coverage bar in the editor.'))
|
|
711
711
|
},
|
|
712
712
|
category: Categories.Test,
|
|
713
713
|
toggled: {
|
|
@@ -730,7 +730,7 @@ registerAction2(class FilterCoverageToTestInEditor extends Action2 {
|
|
|
730
730
|
constructor() {
|
|
731
731
|
super({
|
|
732
732
|
id: TestCommandId.CoverageFilterToTestInEditor,
|
|
733
|
-
title: ( localize2(
|
|
733
|
+
title: ( localize2(12420, "Filter Coverage to Test")),
|
|
734
734
|
category: Categories.Test,
|
|
735
735
|
icon: Codicon.filter,
|
|
736
736
|
toggled: {
|
|
@@ -818,14 +818,14 @@ registerAction2(class ToggleCoverageInExplorer extends Action2 {
|
|
|
818
818
|
constructor() {
|
|
819
819
|
super({
|
|
820
820
|
id: TestCommandId.CoverageToggleInExplorer,
|
|
821
|
-
title: ( localize2(
|
|
821
|
+
title: ( localize2(12421, "Toggle Coverage in Explorer")),
|
|
822
822
|
metadata: {
|
|
823
|
-
description: ( localize2(
|
|
823
|
+
description: ( localize2(12422, 'Toggle the display of test coverage in the File Explorer view.'))
|
|
824
824
|
},
|
|
825
825
|
category: Categories.Test,
|
|
826
826
|
toggled: {
|
|
827
827
|
condition: ( ContextKeyExpr.equals('config.testing.showCoverageInExplorer', true)),
|
|
828
|
-
title: ( localize(
|
|
828
|
+
title: ( localize(12423, "Hide Coverage in Explorer")),
|
|
829
829
|
},
|
|
830
830
|
menu: [
|
|
831
831
|
{ id: MenuId.CommandPalette, when: TestingContextKeys.isTestCoverageOpen },
|
|
@@ -844,7 +844,7 @@ registerAction2(class GoToNextMissedCoverageLine extends Action2 {
|
|
|
844
844
|
id: TestCommandId.CoverageGoToNextMissedLine,
|
|
845
845
|
title: GO_TO_NEXT_MISSED_LINE_TITLE,
|
|
846
846
|
metadata: {
|
|
847
|
-
description: ( localize2(
|
|
847
|
+
description: ( localize2(12424, 'Navigate to the next line that is not covered by tests.'))
|
|
848
848
|
},
|
|
849
849
|
category: Categories.Test,
|
|
850
850
|
icon: Codicon.arrowDown,
|
|
@@ -876,7 +876,7 @@ registerAction2(class GoToPreviousMissedCoverageLine extends Action2 {
|
|
|
876
876
|
id: TestCommandId.CoverageGoToPreviousMissedLine,
|
|
877
877
|
title: GO_TO_PREVIOUS_MISSED_LINE_TITLE,
|
|
878
878
|
metadata: {
|
|
879
|
-
description: ( localize2(
|
|
879
|
+
description: ( localize2(12425, 'Navigate to the previous line that is not covered by tests.'))
|
|
880
880
|
},
|
|
881
881
|
category: Categories.Test,
|
|
882
882
|
icon: Codicon.arrowUp,
|
|
@@ -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(12426, "Showing \"{0}\"", label));
|
|
79
|
+
labels.clickToChangeFiltering = ( localize(12427, 'Click to view coverage for a single test'));
|
|
80
|
+
labels.percentCoverage = (percent, precision) => ( localize(12428, '{0} Coverage', displayPercent(percent, precision)));
|
|
81
|
+
labels.allTests = ( localize(12429, 'All tests'));
|
|
82
|
+
labels.pickShowCoverage = ( localize(12430, '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(12431, 'View icon of the test view.')));
|
|
11
|
+
const testingResultsIcon = registerIcon('test-results-icon', Codicon.checklist, ( localize(12432, 'Icons for test results.')));
|
|
12
|
+
const testingRunIcon = registerIcon('testing-run-icon', Codicon.run, ( localize(12433, 'Icon of the "run test" action.')));
|
|
13
|
+
const testingRerunIcon = registerIcon('testing-rerun-icon', Codicon.debugRerun, ( localize(12434, 'Icon of the "rerun tests" action.')));
|
|
14
|
+
const testingRunAllIcon = registerIcon('testing-run-all-icon', Codicon.runAll, ( localize(12435, 'Icon of the "run all tests" action.')));
|
|
15
|
+
const testingDebugAllIcon = registerIcon('testing-debug-all-icon', Codicon.debugAltSmall, ( localize(12436, 'Icon of the "debug all tests" action.')));
|
|
16
|
+
const testingDebugIcon = registerIcon('testing-debug-icon', Codicon.debugAltSmall, ( localize(12437, 'Icon of the "debug test" action.')));
|
|
17
|
+
const testingCoverageIcon = registerIcon('testing-coverage-icon', Codicon.runCoverage, ( localize(12438, 'Icon of the "run test with coverage" action.')));
|
|
18
|
+
const testingCoverageAllIcon = registerIcon('testing-coverage-all-icon', Codicon.runAllCoverage, ( localize(12439, 'Icon of the "run all tests with coverage" action.')));
|
|
19
|
+
const testingCancelIcon = registerIcon('testing-cancel-icon', Codicon.debugStop, ( localize(12440, 'Icon to cancel ongoing test runs.')));
|
|
20
|
+
const testingFilterIcon = registerIcon('testing-filter', Codicon.filter, ( localize(12441, 'Icon for the \'Filter\' action in the testing view.')));
|
|
21
|
+
const testingHiddenIcon = registerIcon('testing-hidden', Codicon.eyeClosed, ( localize(12442, 'Icon shown beside hidden tests, when they\'ve been shown.')));
|
|
22
|
+
registerIcon('testing-show-as-list-icon', Codicon.listTree, ( localize(12443, 'Icon shown when the test explorer is disabled as a tree.')));
|
|
23
|
+
registerIcon('testing-show-as-list-icon', Codicon.listFlat, ( localize(12444, 'Icon shown when the test explorer is disabled as a list.')));
|
|
24
|
+
const testingUpdateProfiles = registerIcon('testing-update-profiles', Codicon.gear, ( localize(12445, 'Icon shown to update test profiles.')));
|
|
25
|
+
const testingRefreshTests = registerIcon('testing-refresh-tests', Codicon.refresh, ( localize(12446, 'Icon on the button to refresh tests.')));
|
|
26
|
+
const testingTurnContinuousRunOn = registerIcon('testing-turn-continuous-run-on', Codicon.eye, ( localize(12447, 'Icon to turn continuous test runs on.')));
|
|
27
|
+
const testingTurnContinuousRunOff = registerIcon('testing-turn-continuous-run-off', Codicon.eyeClosed, ( localize(12448, 'Icon to turn continuous test runs off.')));
|
|
28
|
+
const testingContinuousIsOn = registerIcon('testing-continuous-is-on', Codicon.eye, ( localize(12449, 'Icon when continuous run is on for a test ite,.')));
|
|
29
|
+
const testingCancelRefreshTests = registerIcon('testing-cancel-refresh-tests', Codicon.stop, ( localize(12450, 'Icon on the button to cancel refreshing tests.')));
|
|
30
|
+
const testingCoverageReport = registerIcon('testing-coverage', Codicon.coverage, ( localize(12451, 'Icon representing test coverage')));
|
|
31
|
+
const testingWasCovered = registerIcon('testing-was-covered', Codicon.check, ( localize(12452, 'Icon representing that an element was covered')));
|
|
32
|
+
const testingCoverageMissingBranch = registerIcon('testing-missing-branch', Codicon.question, ( localize(12453, '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(12454, 'Icon shown for tests that have an error.')))],
|
|
35
|
+
[TestResultState.Failed, registerIcon('testing-failed-icon', Codicon.error, ( localize(12455, 'Icon shown for tests that failed.')))],
|
|
36
|
+
[TestResultState.Passed, registerIcon('testing-passed-icon', Codicon.pass, ( localize(12456, 'Icon shown for tests that passed.')))],
|
|
37
|
+
[TestResultState.Queued, registerIcon('testing-queued-icon', Codicon.history, ( localize(12457, '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(12458, 'Icon shown for tests that are skipped.')))],
|
|
40
|
+
[TestResultState.Unset, registerIcon('testing-unset-icon', Codicon.circleOutline, ( localize(12459, '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
|
+
12460,
|
|
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
|
+
12461,
|
|
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
|
+
12462,
|
|
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(12463, "{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(12464, "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(12465, "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(12466, "{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(12467, "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(12468, '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(12469, '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(12470, 'Sort by Location')), value: CoverageSortOrder.Location, description: ( localize(
|
|
644
|
+
12471,
|
|
645
645
|
'Files are sorted alphabetically, declarations are sorted by position'
|
|
646
646
|
)) },
|
|
647
|
-
{ label: ( localize(
|
|
648
|
-
{ label: ( localize(
|
|
647
|
+
{ label: ( localize(12472, 'Sort by Coverage')), value: CoverageSortOrder.Coverage, description: ( localize(12473, 'Files and declarations are sorted by total coverage')) },
|
|
648
|
+
{ label: ( localize(12474, 'Sort by Name')), value: CoverageSortOrder.Name, description: ( localize(12475, 'Files and declarations are sorted alphabetically')) },
|
|
649
649
|
];
|
|
650
|
-
quickInput.placeholder = ( localize(
|
|
650
|
+
quickInput.placeholder = ( localize(12476, '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(12477, 'Collapse All Coverage')),
|
|
669
669
|
icon: Codicon.collapseAll,
|
|
670
670
|
menu: {
|
|
671
671
|
id: MenuId.ViewTitle,
|