@codingame/monaco-vscode-testing-service-override 13.1.4 → 13.1.5
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 +14 -14
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +17 -17
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.js +70 -70
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.js +5 -5
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsSubject.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.js +19 -19
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.js +3 -3
- 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 +18 -18
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +12 -12
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +14 -14
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +13 -13
- package/vscode/src/vs/workbench/contrib/testing/browser/testingProgressUiService.js +5 -5
- 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 +33 -33
- package/vscode/src/vs/workbench/contrib/testing/common/testExclusions.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.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.js +29 -29
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-testing-service-override",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - testing service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-0b087f42-a5a3-5eb9-9bfd-1eebc1bba163-common": "13.1.
|
|
19
|
-
"@codingame/monaco-vscode-10418ae3-ee63-5700-a757-89cbe6564ee4-common": "13.1.
|
|
20
|
-
"@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common": "13.1.
|
|
21
|
-
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "13.1.
|
|
22
|
-
"@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common": "13.1.
|
|
23
|
-
"@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common": "13.1.
|
|
24
|
-
"@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "13.1.
|
|
25
|
-
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "13.1.
|
|
26
|
-
"@codingame/monaco-vscode-api": "13.1.
|
|
27
|
-
"@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common": "13.1.
|
|
28
|
-
"@codingame/monaco-vscode-e7080bda-ce3e-5243-9a35-98cd9634dbda-common": "13.1.
|
|
29
|
-
"@codingame/monaco-vscode-f6ab89b2-83b0-5a43-8772-cb0eafa650b5-common": "13.1.
|
|
30
|
-
"@codingame/monaco-vscode-terminal-service-override": "13.1.
|
|
18
|
+
"@codingame/monaco-vscode-0b087f42-a5a3-5eb9-9bfd-1eebc1bba163-common": "13.1.5",
|
|
19
|
+
"@codingame/monaco-vscode-10418ae3-ee63-5700-a757-89cbe6564ee4-common": "13.1.5",
|
|
20
|
+
"@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common": "13.1.5",
|
|
21
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "13.1.5",
|
|
22
|
+
"@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common": "13.1.5",
|
|
23
|
+
"@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common": "13.1.5",
|
|
24
|
+
"@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "13.1.5",
|
|
25
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "13.1.5",
|
|
26
|
+
"@codingame/monaco-vscode-api": "13.1.5",
|
|
27
|
+
"@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common": "13.1.5",
|
|
28
|
+
"@codingame/monaco-vscode-e7080bda-ce3e-5243-9a35-98cd9634dbda-common": "13.1.5",
|
|
29
|
+
"@codingame/monaco-vscode-f6ab89b2-83b0-5a43-8772-cb0eafa650b5-common": "13.1.5",
|
|
30
|
+
"@codingame/monaco-vscode-terminal-service-override": "13.1.5"
|
|
31
31
|
},
|
|
32
32
|
"main": "index.js",
|
|
33
33
|
"module": "index.js",
|
|
@@ -54,7 +54,7 @@ import { TestingContextKeys } from '../common/testingContextKeys.js';
|
|
|
54
54
|
|
|
55
55
|
const CLASS_HIT = 'coverage-deco-hit';
|
|
56
56
|
const CLASS_MISS = 'coverage-deco-miss';
|
|
57
|
-
const TOGGLE_INLINE_COMMAND_TEXT = ( localize(
|
|
57
|
+
const TOGGLE_INLINE_COMMAND_TEXT = ( localize(9996, 'Toggle Inline'));
|
|
58
58
|
const TOGGLE_INLINE_COMMAND_ID = 'testing.toggleInlineCoverage';
|
|
59
59
|
const BRANCH_MISS_INDICATOR_CHARS = 4;
|
|
60
60
|
let CodeCoverageDecorations = class CodeCoverageDecorations extends Disposable {
|
|
@@ -378,7 +378,7 @@ class CoverageDetailsModel {
|
|
|
378
378
|
if (detail.branches?.length) {
|
|
379
379
|
const covered = detail.branches.filter(b => !!b.count).length;
|
|
380
380
|
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
381
|
-
|
|
381
|
+
9997,
|
|
382
382
|
'{0} of {1} of branches in {2} were covered.',
|
|
383
383
|
covered,
|
|
384
384
|
detail.branches.length,
|
|
@@ -394,13 +394,13 @@ class CoverageDetailsModel {
|
|
|
394
394
|
const { count, label } = detail.detail.branches[detail.branch];
|
|
395
395
|
const label2 = label ? wrapInBackticks(label) : `#${detail.branch + 1}`;
|
|
396
396
|
if (!count) {
|
|
397
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
397
|
+
return ( new MarkdownString()).appendMarkdown(( localize(9998, 'Branch {0} in {1} was not covered.', label2, text)));
|
|
398
398
|
}
|
|
399
399
|
else if (count === true) {
|
|
400
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
400
|
+
return ( new MarkdownString()).appendMarkdown(( localize(9999, 'Branch {0} in {1} was executed.', label2, text)));
|
|
401
401
|
}
|
|
402
402
|
else {
|
|
403
|
-
return ( new MarkdownString()).appendMarkdown(( localize(
|
|
403
|
+
return ( new MarkdownString()).appendMarkdown(( localize(10000, 'Branch {0} in {1} was executed {2} time(s).', label2, text, count)));
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
assertNever();
|
|
@@ -408,10 +408,10 @@ class CoverageDetailsModel {
|
|
|
408
408
|
}
|
|
409
409
|
function namedDetailLabel(name, detail) {
|
|
410
410
|
return ( new MarkdownString()).appendMarkdown(!detail.count
|
|
411
|
-
? ( localize(
|
|
411
|
+
? ( localize(10001, '`{0}` was not executed.', name))
|
|
412
412
|
: typeof detail.count === 'number'
|
|
413
|
-
? ( localize(
|
|
414
|
-
: ( localize(
|
|
413
|
+
? ( localize(10002, '`{0}` was executed {1} time(s).', name, detail.count))
|
|
414
|
+
: ( localize(10003, '`{0}` was executed.', name)));
|
|
415
415
|
}
|
|
416
416
|
function tidyLocation(location) {
|
|
417
417
|
if (location instanceof Position) {
|
|
@@ -508,8 +508,8 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
508
508
|
return;
|
|
509
509
|
}
|
|
510
510
|
const toggleAction = ( new ActionWithIcon('toggleInline', this.coverage.showInline.get()
|
|
511
|
-
? ( localize(
|
|
512
|
-
: ( localize(
|
|
511
|
+
? ( localize(10004, 'Hide Inline Coverage'))
|
|
512
|
+
: ( localize(10005, 'Show Inline Coverage')), testingCoverageReport, undefined, () => this.coverage.showInline.set(!this.coverage.showInline.get(), undefined)));
|
|
513
513
|
const kb = this.keybindingService.lookupKeybinding(TOGGLE_INLINE_COMMAND_ID);
|
|
514
514
|
if (kb) {
|
|
515
515
|
toggleAction.tooltip = `${TOGGLE_INLINE_COMMAND_TEXT} (${kb.getLabel()})`;
|
|
@@ -528,12 +528,12 @@ let CoverageToolbarWidget = class CoverageToolbarWidget extends Disposable {
|
|
|
528
528
|
}
|
|
529
529
|
else if (current.coverage.perTestData?.size) {
|
|
530
530
|
this.actionBar.push(( new ActionWithIcon('perTestFilter', ( localize(
|
|
531
|
-
|
|
531
|
+
10006,
|
|
532
532
|
"{0} test(s) ran code in this file",
|
|
533
533
|
current.coverage.perTestData.size
|
|
534
534
|
)), testingFilterIcon, undefined, () => this.commandService.executeCommand(TestCommandId.CoverageFilterToTestInEditor, this.current, this.editor))));
|
|
535
535
|
}
|
|
536
|
-
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(
|
|
536
|
+
this.actionBar.push(( new ActionWithIcon('rerun', ( localize(10007, 'Rerun')), testingRerunIcon, !this.isRunning, () => this.rerunTest())));
|
|
537
537
|
}
|
|
538
538
|
show() {
|
|
539
539
|
if (this.registered) {
|
|
@@ -593,7 +593,7 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
593
593
|
constructor() {
|
|
594
594
|
super({
|
|
595
595
|
id: TOGGLE_INLINE_COMMAND_ID,
|
|
596
|
-
title: ( localize2(
|
|
596
|
+
title: ( localize2(10008, "Toggle Inline Coverage")),
|
|
597
597
|
category: Categories.Test,
|
|
598
598
|
keybinding: {
|
|
599
599
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -601,7 +601,7 @@ registerAction2(class ToggleInlineCoverage extends Action2 {
|
|
|
601
601
|
},
|
|
602
602
|
toggled: {
|
|
603
603
|
condition: TestingContextKeys.inlineCoverageEnabled,
|
|
604
|
-
title: ( localize(
|
|
604
|
+
title: ( localize(10009, "Hide Inline Coverage")),
|
|
605
605
|
},
|
|
606
606
|
icon: testingCoverageReport,
|
|
607
607
|
menu: [
|
|
@@ -619,9 +619,9 @@ registerAction2(class ToggleCoverageToolbar extends Action2 {
|
|
|
619
619
|
constructor() {
|
|
620
620
|
super({
|
|
621
621
|
id: TestCommandId.CoverageToggleToolbar,
|
|
622
|
-
title: ( localize2(
|
|
622
|
+
title: ( localize2(10010, "Test Coverage Toolbar")),
|
|
623
623
|
metadata: {
|
|
624
|
-
description: ( localize2(
|
|
624
|
+
description: ( localize2(10011, 'Toggle the sticky coverage bar in the editor.'))
|
|
625
625
|
},
|
|
626
626
|
category: Categories.Test,
|
|
627
627
|
toggled: {
|
|
@@ -644,7 +644,7 @@ registerAction2(class FilterCoverageToTestInEditor extends Action2 {
|
|
|
644
644
|
constructor() {
|
|
645
645
|
super({
|
|
646
646
|
id: TestCommandId.CoverageFilterToTestInEditor,
|
|
647
|
-
title: ( localize2(
|
|
647
|
+
title: ( localize2(10012, "Filter Coverage to Test")),
|
|
648
648
|
category: Categories.Test,
|
|
649
649
|
icon: Codicon.filter,
|
|
650
650
|
toggled: {
|
|
@@ -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(10013, "Showing \"{0}\"", label));
|
|
79
|
+
labels.clickToChangeFiltering = ( localize(10014, 'Click to view coverage for a single test'));
|
|
80
|
+
labels.percentCoverage = (percent, precision) => ( localize(10015, '{0} Coverage', displayPercent(percent, precision)));
|
|
81
|
+
labels.allTests = ( localize(10016, 'All tests'));
|
|
82
|
+
labels.pickShowCoverage = ( localize(10017, '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(10018, 'View icon of the test view.')));
|
|
11
|
+
const testingResultsIcon = registerIcon('test-results-icon', Codicon.checklist, ( localize(10019, 'Icons for test results.')));
|
|
12
|
+
const testingRunIcon = registerIcon('testing-run-icon', Codicon.run, ( localize(10020, 'Icon of the "run test" action.')));
|
|
13
|
+
const testingRerunIcon = registerIcon('testing-rerun-icon', Codicon.debugRerun, ( localize(10021, 'Icon of the "rerun tests" action.')));
|
|
14
|
+
const testingRunAllIcon = registerIcon('testing-run-all-icon', Codicon.runAll, ( localize(10022, 'Icon of the "run all tests" action.')));
|
|
15
|
+
const testingDebugAllIcon = registerIcon('testing-debug-all-icon', Codicon.debugAltSmall, ( localize(10023, 'Icon of the "debug all tests" action.')));
|
|
16
|
+
const testingDebugIcon = registerIcon('testing-debug-icon', Codicon.debugAltSmall, ( localize(10024, 'Icon of the "debug test" action.')));
|
|
17
|
+
const testingCoverageIcon = registerIcon('testing-coverage-icon', Codicon.runCoverage, ( localize(10025, 'Icon of the "run test with coverage" action.')));
|
|
18
|
+
const testingCoverageAllIcon = registerIcon('testing-coverage-all-icon', Codicon.runAllCoverage, ( localize(10026, 'Icon of the "run all tests with coverage" action.')));
|
|
19
|
+
const testingCancelIcon = registerIcon('testing-cancel-icon', Codicon.debugStop, ( localize(10027, 'Icon to cancel ongoing test runs.')));
|
|
20
|
+
const testingFilterIcon = registerIcon('testing-filter', Codicon.filter, ( localize(10028, 'Icon for the \'Filter\' action in the testing view.')));
|
|
21
|
+
const testingHiddenIcon = registerIcon('testing-hidden', Codicon.eyeClosed, ( localize(10029, 'Icon shown beside hidden tests, when they\'ve been shown.')));
|
|
22
|
+
registerIcon('testing-show-as-list-icon', Codicon.listTree, ( localize(10030, 'Icon shown when the test explorer is disabled as a tree.')));
|
|
23
|
+
registerIcon('testing-show-as-list-icon', Codicon.listFlat, ( localize(10031, 'Icon shown when the test explorer is disabled as a list.')));
|
|
24
|
+
const testingUpdateProfiles = registerIcon('testing-update-profiles', Codicon.gear, ( localize(10032, 'Icon shown to update test profiles.')));
|
|
25
|
+
const testingRefreshTests = registerIcon('testing-refresh-tests', Codicon.refresh, ( localize(10033, 'Icon on the button to refresh tests.')));
|
|
26
|
+
const testingTurnContinuousRunOn = registerIcon('testing-turn-continuous-run-on', Codicon.eye, ( localize(10034, 'Icon to turn continuous test runs on.')));
|
|
27
|
+
const testingTurnContinuousRunOff = registerIcon('testing-turn-continuous-run-off', Codicon.eyeClosed, ( localize(10035, 'Icon to turn continuous test runs off.')));
|
|
28
|
+
const testingContinuousIsOn = registerIcon('testing-continuous-is-on', Codicon.eye, ( localize(10036, 'Icon when continuous run is on for a test ite,.')));
|
|
29
|
+
const testingCancelRefreshTests = registerIcon('testing-cancel-refresh-tests', Codicon.stop, ( localize(10037, 'Icon on the button to cancel refreshing tests.')));
|
|
30
|
+
const testingCoverageReport = registerIcon('testing-coverage', Codicon.coverage, ( localize(10038, 'Icon representing test coverage')));
|
|
31
|
+
const testingWasCovered = registerIcon('testing-was-covered', Codicon.check, ( localize(10039, 'Icon representing that an element was covered')));
|
|
32
|
+
const testingCoverageMissingBranch = registerIcon('testing-missing-branch', Codicon.question, ( localize(10040, '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(10041, 'Icon shown for tests that have an error.')))],
|
|
35
|
+
[TestResultState.Failed, registerIcon('testing-failed-icon', Codicon.error, ( localize(10042, 'Icon shown for tests that failed.')))],
|
|
36
|
+
[TestResultState.Passed, registerIcon('testing-passed-icon', Codicon.pass, ( localize(10043, 'Icon shown for tests that passed.')))],
|
|
37
|
+
[TestResultState.Queued, registerIcon('testing-queued-icon', Codicon.history, ( localize(10044, '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(10045, 'Icon shown for tests that are skipped.')))],
|
|
40
|
+
[TestResultState.Unset, registerIcon('testing-unset-icon', Codicon.circleOutline, ( localize(10046, '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()) {
|
|
@@ -130,21 +130,21 @@ const renderBar = (bar, pct, isZero, thresholds) => {
|
|
|
130
130
|
};
|
|
131
131
|
const nf = new Intl.NumberFormat();
|
|
132
132
|
const stmtCoverageText = (coverage) => ( localize(
|
|
133
|
-
|
|
133
|
+
10047,
|
|
134
134
|
'{0}/{1} statements covered ({2})',
|
|
135
135
|
nf.format(coverage.statement.covered),
|
|
136
136
|
nf.format(coverage.statement.total),
|
|
137
137
|
displayPercent(percent(coverage.statement))
|
|
138
138
|
));
|
|
139
139
|
const fnCoverageText = (coverage) => coverage.declaration && ( localize(
|
|
140
|
-
|
|
140
|
+
10048,
|
|
141
141
|
'{0}/{1} functions covered ({2})',
|
|
142
142
|
nf.format(coverage.declaration.covered),
|
|
143
143
|
nf.format(coverage.declaration.total),
|
|
144
144
|
displayPercent(percent(coverage.declaration))
|
|
145
145
|
));
|
|
146
146
|
const branchCoverageText = (coverage) => coverage.branch && ( localize(
|
|
147
|
-
|
|
147
|
+
10049,
|
|
148
148
|
'{0}/{1} branches covered ({2})',
|
|
149
149
|
nf.format(coverage.branch.covered),
|
|
150
150
|
nf.format(coverage.branch.total),
|
|
@@ -26,7 +26,7 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
26
26
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
27
27
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
28
28
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
29
|
-
import {
|
|
29
|
+
import { EditorOpenSource, TextEditorSelectionRevealType } from '@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor';
|
|
30
30
|
import { FileKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
31
31
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
32
32
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -163,7 +163,7 @@ DeclarationCoverageNode.__decorator = ( __decorate([
|
|
|
163
163
|
], DeclarationCoverageNode.prototype, "attributableCoverage", null));
|
|
164
164
|
class RevealUncoveredDeclarations {
|
|
165
165
|
get label() {
|
|
166
|
-
return localize(
|
|
166
|
+
return localize(10050, "{0} declarations without coverage...", this.n);
|
|
167
167
|
}
|
|
168
168
|
constructor(n) {
|
|
169
169
|
this.n = n;
|
|
@@ -173,7 +173,7 @@ class RevealUncoveredDeclarations {
|
|
|
173
173
|
class LoadingDetails {
|
|
174
174
|
constructor() {
|
|
175
175
|
this.id = String(fnNodeId++);
|
|
176
|
-
this.label = ( localize(
|
|
176
|
+
this.label = ( localize(10051, "Loading Coverage Details..."));
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
const isFileCoverage = (c) => typeof c === 'object' && 'value' in c;
|
|
@@ -204,14 +204,14 @@ let TestCoverageTree = class TestCoverageTree extends Disposable {
|
|
|
204
204
|
getAriaLabel(element) {
|
|
205
205
|
if (isFileCoverage(element)) {
|
|
206
206
|
const name = basenameOrAuthority(element.value.uri);
|
|
207
|
-
return localize(
|
|
207
|
+
return localize(10052, "{0} coverage: {0}%", name, (element.value.tpc * 100).toFixed(2));
|
|
208
208
|
}
|
|
209
209
|
else {
|
|
210
210
|
return element.label;
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
213
|
getWidgetAriaLabel() {
|
|
214
|
-
return localize(
|
|
214
|
+
return localize(10053, "Test Coverage Explorer");
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
217
|
identityProvider: ( new TestCoverageIdentityProvider()),
|
|
@@ -510,7 +510,7 @@ registerAction2(class TestCoverageChangePerTestFilterAction extends Action2 {
|
|
|
510
510
|
super({
|
|
511
511
|
id: TestCommandId.CoverageFilterToTest,
|
|
512
512
|
category: Categories.Test,
|
|
513
|
-
title: ( localize2(
|
|
513
|
+
title: ( localize2(10054, 'Filter Coverage by Test')),
|
|
514
514
|
icon: Codicon.filter,
|
|
515
515
|
toggled: {
|
|
516
516
|
icon: Codicon.filterFilled,
|
|
@@ -561,7 +561,7 @@ registerAction2(class TestCoverageChangeSortingAction extends ViewAction {
|
|
|
561
561
|
super({
|
|
562
562
|
id: TestCommandId.CoverageViewChangeSorting,
|
|
563
563
|
viewId: Testing.CoverageViewId,
|
|
564
|
-
title: ( localize2(
|
|
564
|
+
title: ( localize2(10055, 'Change Sort Order')),
|
|
565
565
|
icon: Codicon.sortPrecedence,
|
|
566
566
|
menu: {
|
|
567
567
|
id: MenuId.ViewTitle,
|
|
@@ -574,14 +574,14 @@ registerAction2(class TestCoverageChangeSortingAction extends ViewAction {
|
|
|
574
574
|
const disposables = ( new DisposableStore());
|
|
575
575
|
const quickInput = disposables.add(accessor.get(IQuickInputService).createQuickPick());
|
|
576
576
|
const items = [
|
|
577
|
-
{ label: ( localize(
|
|
578
|
-
|
|
577
|
+
{ label: ( localize(10056, 'Sort by Location')), value: CoverageSortOrder.Location, description: ( localize(
|
|
578
|
+
10057,
|
|
579
579
|
'Files are sorted alphabetically, declarations are sorted by position'
|
|
580
580
|
)) },
|
|
581
|
-
{ label: ( localize(
|
|
582
|
-
{ label: ( localize(
|
|
581
|
+
{ label: ( localize(10058, 'Sort by Coverage')), value: CoverageSortOrder.Coverage, description: ( localize(10059, 'Files and declarations are sorted by total coverage')) },
|
|
582
|
+
{ label: ( localize(10060, 'Sort by Name')), value: CoverageSortOrder.Name, description: ( localize(10061, 'Files and declarations are sorted alphabetically')) },
|
|
583
583
|
];
|
|
584
|
-
quickInput.placeholder = ( localize(
|
|
584
|
+
quickInput.placeholder = ( localize(10062, 'Sort the Test Coverage view...'));
|
|
585
585
|
quickInput.items = items;
|
|
586
586
|
quickInput.show();
|
|
587
587
|
disposables.add(quickInput.onDidHide(() => disposables.dispose()));
|