@codingame/monaco-vscode-testing-service-override 30.0.1 → 31.0.1
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 +5 -5
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +46 -27
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDisplayUtils.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDisplayUtils.js +15 -6
- 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 +16 -16
- 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.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.js +41 -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 +27 -22
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +19 -17
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +14 -11
- package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/theme.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/theme.js +45 -33
- package/vscode/src/vs/workbench/contrib/testing/common/configuration.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/testing/common/configuration.js +30 -24
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +7 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.js +75 -17
- 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
|
@@ -261,7 +261,7 @@ let TestingPeekOpener = class TestingPeekOpener extends Disposable {
|
|
|
261
261
|
} else {
|
|
262
262
|
this.commandService.executeCommand("markdown.showPreview", current.messageUri).catch(err => {
|
|
263
263
|
this.notificationService.error(( localize(
|
|
264
|
-
|
|
264
|
+
14721,
|
|
265
265
|
"Could not open markdown preview: {0}.\n\nPlease make sure the markdown extension is enabled.",
|
|
266
266
|
err.message
|
|
267
267
|
)));
|
|
@@ -315,6 +315,9 @@ let TestingPeekOpener = class TestingPeekOpener extends Disposable {
|
|
|
315
315
|
if (!( Iterable.some(resultItemParents(evt.result, evt.item), i => i.item.uri && ( editorUris.has(( i.item.uri.toString())))))) {
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
|
+
if (!( editorUris.has(( candidate.location.uri.toString())))) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
318
321
|
break;
|
|
319
322
|
}
|
|
320
323
|
case AutoOpenPeekViewWhen.FailureAnywhere:
|
|
@@ -756,7 +759,7 @@ let TestResultsPeek = class TestResultsPeek extends PeekViewWidget {
|
|
|
756
759
|
stripIcons(subject.test.label)
|
|
757
760
|
);
|
|
758
761
|
} else {
|
|
759
|
-
this.setTitle(( localize(
|
|
762
|
+
this.setTitle(( localize(14722, "Test Output")));
|
|
760
763
|
}
|
|
761
764
|
this.applyTheme();
|
|
762
765
|
await this.content.reveal({
|
|
@@ -873,7 +876,7 @@ class CloseTestPeek extends EditorAction2 {
|
|
|
873
876
|
constructor() {
|
|
874
877
|
super({
|
|
875
878
|
id: "editor.closeTestPeek",
|
|
876
|
-
title: ( localize2(
|
|
879
|
+
title: ( localize2(14723, "Close")),
|
|
877
880
|
icon: Codicon.close,
|
|
878
881
|
precondition: ( ContextKeyExpr.or(TestingContextKeys.isInPeek, TestingContextKeys.isPeekVisible)),
|
|
879
882
|
keybinding: {
|
|
@@ -914,9 +917,9 @@ class GoToNextMessageAction extends Action2 {
|
|
|
914
917
|
super({
|
|
915
918
|
id: GoToNextMessageAction.ID,
|
|
916
919
|
f1: true,
|
|
917
|
-
title: ( localize2(
|
|
920
|
+
title: ( localize2(14724, "Go to Next Test Failure")),
|
|
918
921
|
metadata: {
|
|
919
|
-
description: ( localize2(
|
|
922
|
+
description: ( localize2(14725, "Shows the next failure message in your file"))
|
|
920
923
|
},
|
|
921
924
|
icon: Codicon.arrowDown,
|
|
922
925
|
category: Categories.Test,
|
|
@@ -950,9 +953,9 @@ class GoToPreviousMessageAction extends Action2 {
|
|
|
950
953
|
super({
|
|
951
954
|
id: GoToPreviousMessageAction.ID,
|
|
952
955
|
f1: true,
|
|
953
|
-
title: ( localize2(
|
|
956
|
+
title: ( localize2(14726, "Go to Previous Test Failure")),
|
|
954
957
|
metadata: {
|
|
955
|
-
description: ( localize2(
|
|
958
|
+
description: ( localize2(14727, "Shows the previous failure message in your file"))
|
|
956
959
|
},
|
|
957
960
|
icon: Codicon.arrowUp,
|
|
958
961
|
category: Categories.Test,
|
|
@@ -985,7 +988,7 @@ class CollapsePeekStack extends Action2 {
|
|
|
985
988
|
constructor() {
|
|
986
989
|
super({
|
|
987
990
|
id: CollapsePeekStack.ID,
|
|
988
|
-
title: ( localize2(
|
|
991
|
+
title: ( localize2(14728, "Collapse Stack Frames")),
|
|
989
992
|
icon: Codicon.collapseAll,
|
|
990
993
|
category: Categories.Test,
|
|
991
994
|
menu: [{
|
|
@@ -1011,7 +1014,7 @@ class OpenMessageInEditorAction extends Action2 {
|
|
|
1011
1014
|
super({
|
|
1012
1015
|
id: OpenMessageInEditorAction.ID,
|
|
1013
1016
|
f1: false,
|
|
1014
|
-
title: ( localize2(
|
|
1017
|
+
title: ( localize2(14729, "Open in Editor")),
|
|
1015
1018
|
icon: Codicon.goToFile,
|
|
1016
1019
|
category: Categories.Test,
|
|
1017
1020
|
menu: [{
|
|
@@ -1031,9 +1034,9 @@ class ToggleTestingPeekHistory extends Action2 {
|
|
|
1031
1034
|
super({
|
|
1032
1035
|
id: ToggleTestingPeekHistory.ID,
|
|
1033
1036
|
f1: true,
|
|
1034
|
-
title: ( localize2(
|
|
1037
|
+
title: ( localize2(14730, "Toggle Test History in Peek")),
|
|
1035
1038
|
metadata: {
|
|
1036
|
-
description: ( localize2(
|
|
1039
|
+
description: ( localize2(14731, "Shows or hides the history of test runs in the peek view"))
|
|
1037
1040
|
},
|
|
1038
1041
|
icon: Codicon.history,
|
|
1039
1042
|
category: Categories.Test,
|
|
@@ -41,7 +41,7 @@ let TestingViewPaneContainer = class TestingViewPaneContainer extends ViewPaneCo
|
|
|
41
41
|
return 400;
|
|
42
42
|
}
|
|
43
43
|
getTitle() {
|
|
44
|
-
return localize(
|
|
44
|
+
return localize(14732, "Testing");
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
TestingViewPaneContainer = ( __decorate([( __param(0, IWorkbenchLayoutService)), ( __param(1, ITelemetryService)), ( __param(2, IInstantiationService)), ( __param(3, IContextMenuService)), ( __param(4, IThemeService)), ( __param(5, IStorageService)), ( __param(6, IConfigurationService)), ( __param(7, IExtensionService)), ( __param(8, IWorkspaceContextService)), ( __param(9, IViewDescriptorService)), ( __param(10, ILogService))], TestingViewPaneContainer));
|
|
@@ -17,6 +17,8 @@ export declare const testingUncoveredBranchBackground: string;
|
|
|
17
17
|
export declare const testingUncoveredBackground: string;
|
|
18
18
|
export declare const testingUncoveredBorder: string;
|
|
19
19
|
export declare const testingUncoveredGutterBackground: string;
|
|
20
|
+
export declare const testingCoveredMinimapBackground: string;
|
|
21
|
+
export declare const testingUncoveredMinimapBackground: string;
|
|
20
22
|
export declare const testingCoverCountBadgeBackground: string;
|
|
21
23
|
export declare const testingCoverCountBadgeForeground: string;
|
|
22
24
|
export declare const testStatesToIconColors: {
|
|
@@ -14,31 +14,31 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/sear
|
|
|
14
14
|
import { registerThemingParticipant } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
|
|
15
15
|
import { TestResultState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testTypes';
|
|
16
16
|
|
|
17
|
-
const testingColorIconFailed = registerColor("testing.iconFailed", listErrorForeground, ( localize(
|
|
18
|
-
const testingColorIconErrored = registerColor("testing.iconErrored", listErrorForeground, ( localize(
|
|
17
|
+
const testingColorIconFailed = registerColor("testing.iconFailed", listErrorForeground, ( localize(14733, "Color for the 'failed' icon in the test explorer.")));
|
|
18
|
+
const testingColorIconErrored = registerColor("testing.iconErrored", listErrorForeground, ( localize(14734, "Color for the 'Errored' icon in the test explorer.")));
|
|
19
19
|
const testingColorIconPassed = registerColor("testing.iconPassed", {
|
|
20
20
|
dark: "#73c991",
|
|
21
21
|
light: "#73c991",
|
|
22
22
|
hcDark: "#73c991",
|
|
23
23
|
hcLight: "#007100"
|
|
24
|
-
}, ( localize(
|
|
25
|
-
const testingColorRunAction = registerColor("testing.runAction", testingColorIconPassed, ( localize(
|
|
26
|
-
const testingColorIconQueued = registerColor("testing.iconQueued", listWarningForeground, ( localize(
|
|
27
|
-
const testingColorIconUnset = registerColor("testing.iconUnset", "#848484", ( localize(
|
|
28
|
-
const testingColorIconSkipped = registerColor("testing.iconSkipped", "#848484", ( localize(
|
|
24
|
+
}, ( localize(14735, "Color for the 'passed' icon in the test explorer.")));
|
|
25
|
+
const testingColorRunAction = registerColor("testing.runAction", testingColorIconPassed, ( localize(14736, "Color for 'run' icons in the editor.")));
|
|
26
|
+
const testingColorIconQueued = registerColor("testing.iconQueued", listWarningForeground, ( localize(14737, "Color for the 'Queued' icon in the test explorer.")));
|
|
27
|
+
const testingColorIconUnset = registerColor("testing.iconUnset", "#848484", ( localize(14738, "Color for the 'Unset' icon in the test explorer.")));
|
|
28
|
+
const testingColorIconSkipped = registerColor("testing.iconSkipped", "#848484", ( localize(14739, "Color for the 'Skipped' icon in the test explorer.")));
|
|
29
29
|
const testingPeekBorder = registerColor("testing.peekBorder", {
|
|
30
30
|
dark: editorErrorForeground,
|
|
31
31
|
light: editorErrorForeground,
|
|
32
32
|
hcDark: contrastBorder,
|
|
33
33
|
hcLight: contrastBorder
|
|
34
|
-
}, ( localize(
|
|
34
|
+
}, ( localize(14740, "Color of the peek view borders and arrow.")));
|
|
35
35
|
const testingMessagePeekBorder = registerColor("testing.messagePeekBorder", {
|
|
36
36
|
dark: editorInfoForeground,
|
|
37
37
|
light: editorInfoForeground,
|
|
38
38
|
hcDark: contrastBorder,
|
|
39
39
|
hcLight: contrastBorder
|
|
40
40
|
}, ( localize(
|
|
41
|
-
|
|
41
|
+
14741,
|
|
42
42
|
"Color of the peek view borders and arrow when peeking a logged message."
|
|
43
43
|
)));
|
|
44
44
|
const testingPeekHeaderBackground = registerColor("testing.peekHeaderBackground", {
|
|
@@ -46,14 +46,14 @@ const testingPeekHeaderBackground = registerColor("testing.peekHeaderBackground"
|
|
|
46
46
|
light: ( transparent(editorErrorForeground, 0.1)),
|
|
47
47
|
hcDark: null,
|
|
48
48
|
hcLight: null
|
|
49
|
-
}, ( localize(
|
|
49
|
+
}, ( localize(14740, "Color of the peek view borders and arrow.")));
|
|
50
50
|
const testingPeekMessageHeaderBackground = registerColor("testing.messagePeekHeaderBackground", {
|
|
51
51
|
dark: ( transparent(editorInfoForeground, 0.1)),
|
|
52
52
|
light: ( transparent(editorInfoForeground, 0.1)),
|
|
53
53
|
hcDark: null,
|
|
54
54
|
hcLight: null
|
|
55
55
|
}, ( localize(
|
|
56
|
-
|
|
56
|
+
14742,
|
|
57
57
|
"Color of the peek view borders and arrow when peeking a logged message."
|
|
58
58
|
)));
|
|
59
59
|
const testingCoveredBackground = registerColor("testing.coveredBackground", {
|
|
@@ -61,66 +61,78 @@ const testingCoveredBackground = registerColor("testing.coveredBackground", {
|
|
|
61
61
|
light: diffInserted,
|
|
62
62
|
hcDark: null,
|
|
63
63
|
hcLight: null
|
|
64
|
-
}, ( localize(
|
|
64
|
+
}, ( localize(14743, "Background color of text that was covered.")));
|
|
65
65
|
const testingCoveredBorder = registerColor("testing.coveredBorder", {
|
|
66
66
|
dark: ( transparent(testingCoveredBackground, 0.75)),
|
|
67
67
|
light: ( transparent(testingCoveredBackground, 0.75)),
|
|
68
68
|
hcDark: contrastBorder,
|
|
69
69
|
hcLight: contrastBorder
|
|
70
|
-
}, ( localize(
|
|
70
|
+
}, ( localize(14744, "Border color of text that was covered.")));
|
|
71
71
|
registerColor("testing.coveredGutterBackground", {
|
|
72
72
|
dark: ( transparent(diffInserted, 0.6)),
|
|
73
73
|
light: ( transparent(diffInserted, 0.6)),
|
|
74
74
|
hcDark: chartsGreen,
|
|
75
75
|
hcLight: chartsGreen
|
|
76
|
-
}, ( localize(
|
|
76
|
+
}, ( localize(14745, "Gutter color of regions where code was covered.")));
|
|
77
77
|
registerColor("testing.uncoveredBranchBackground", {
|
|
78
78
|
dark: opaque(( transparent(diffRemoved, 2)), editorBackground),
|
|
79
79
|
light: opaque(( transparent(diffRemoved, 2)), editorBackground),
|
|
80
80
|
hcDark: null,
|
|
81
81
|
hcLight: null
|
|
82
|
-
}, ( localize(
|
|
82
|
+
}, ( localize(14746, "Background of the widget shown for an uncovered branch.")));
|
|
83
83
|
const testingUncoveredBackground = registerColor("testing.uncoveredBackground", {
|
|
84
84
|
dark: diffRemoved,
|
|
85
85
|
light: diffRemoved,
|
|
86
86
|
hcDark: null,
|
|
87
87
|
hcLight: null
|
|
88
|
-
}, ( localize(
|
|
88
|
+
}, ( localize(14747, "Background color of text that was not covered.")));
|
|
89
89
|
const testingUncoveredBorder = registerColor("testing.uncoveredBorder", {
|
|
90
90
|
dark: ( transparent(testingUncoveredBackground, 0.75)),
|
|
91
91
|
light: ( transparent(testingUncoveredBackground, 0.75)),
|
|
92
92
|
hcDark: contrastBorder,
|
|
93
93
|
hcLight: contrastBorder
|
|
94
|
-
}, ( localize(
|
|
94
|
+
}, ( localize(14748, "Border color of text that was not covered.")));
|
|
95
95
|
registerColor("testing.uncoveredGutterBackground", {
|
|
96
96
|
dark: ( transparent(diffRemoved, 1.5)),
|
|
97
97
|
light: ( transparent(diffRemoved, 1.5)),
|
|
98
98
|
hcDark: chartsRed,
|
|
99
99
|
hcLight: chartsRed
|
|
100
|
-
}, ( localize(
|
|
101
|
-
registerColor("testing.
|
|
102
|
-
|
|
100
|
+
}, ( localize(14749, "Gutter color of regions where code not covered.")));
|
|
101
|
+
const testingCoveredMinimapBackground = registerColor("testing.coveredMinimapBackground", {
|
|
102
|
+
dark: ( transparent(diffInserted, 0.6)),
|
|
103
|
+
light: ( transparent(diffInserted, 0.6)),
|
|
104
|
+
hcDark: chartsGreen,
|
|
105
|
+
hcLight: chartsGreen
|
|
106
|
+
}, ( localize(14750, "Minimap color of regions where code was covered.")));
|
|
107
|
+
const testingUncoveredMinimapBackground = registerColor("testing.uncoveredMinimapBackground", {
|
|
108
|
+
dark: ( transparent(diffRemoved, 1.5)),
|
|
109
|
+
light: ( transparent(diffRemoved, 1.5)),
|
|
110
|
+
hcDark: chartsRed,
|
|
111
|
+
hcLight: chartsRed
|
|
112
|
+
}, ( localize(14751, "Minimap color of regions where code was not covered.")));
|
|
113
|
+
registerColor("testing.coverCountBadgeBackground", badgeBackground, ( localize(14752, "Background for the badge indicating execution count")));
|
|
114
|
+
registerColor("testing.coverCountBadgeForeground", badgeForeground, ( localize(14753, "Foreground for the badge indicating execution count")));
|
|
103
115
|
const messageBadgeBackground = registerColor(
|
|
104
116
|
"testing.message.error.badgeBackground",
|
|
105
117
|
activityErrorBadgeBackground,
|
|
106
118
|
( localize(
|
|
107
|
-
|
|
119
|
+
14754,
|
|
108
120
|
"Background color of test error messages shown inline in the editor."
|
|
109
121
|
))
|
|
110
122
|
);
|
|
111
123
|
registerColor(
|
|
112
124
|
"testing.message.error.badgeBorder",
|
|
113
125
|
messageBadgeBackground,
|
|
114
|
-
( localize(
|
|
126
|
+
( localize(14755, "Border color of test error messages shown inline in the editor."))
|
|
115
127
|
);
|
|
116
128
|
registerColor(
|
|
117
129
|
"testing.message.error.badgeForeground",
|
|
118
130
|
activityErrorBadgeForeground,
|
|
119
|
-
( localize(
|
|
131
|
+
( localize(14756, "Text color of test error messages shown inline in the editor."))
|
|
120
132
|
);
|
|
121
|
-
registerColor("testing.message.error.lineBackground", null, ( localize(
|
|
122
|
-
registerColor("testing.message.info.decorationForeground", ( transparent(editorForeground, 0.5)), ( localize(
|
|
123
|
-
registerColor("testing.message.info.lineBackground", null, ( localize(
|
|
133
|
+
registerColor("testing.message.error.lineBackground", null, ( localize(14757, "Margin color beside error messages shown inline in the editor.")));
|
|
134
|
+
registerColor("testing.message.info.decorationForeground", ( transparent(editorForeground, 0.5)), ( localize(14758, "Text color of test info messages shown inline in the editor.")));
|
|
135
|
+
registerColor("testing.message.info.lineBackground", null, ( localize(14759, "Margin color beside info messages shown inline in the editor.")));
|
|
124
136
|
const testStatesToIconColors = {
|
|
125
137
|
[TestResultState.Errored]: testingColorIconErrored,
|
|
126
138
|
[TestResultState.Failed]: testingColorIconFailed,
|
|
@@ -129,12 +141,12 @@ const testStatesToIconColors = {
|
|
|
129
141
|
[TestResultState.Unset]: testingColorIconUnset,
|
|
130
142
|
[TestResultState.Skipped]: testingColorIconSkipped
|
|
131
143
|
};
|
|
132
|
-
const testingRetiredColorIconErrored = registerColor("testing.iconErrored.retired", ( transparent(testingColorIconErrored, 0.7)), ( localize(
|
|
133
|
-
const testingRetiredColorIconFailed = registerColor("testing.iconFailed.retired", ( transparent(testingColorIconFailed, 0.7)), ( localize(
|
|
134
|
-
const testingRetiredColorIconPassed = registerColor("testing.iconPassed.retired", ( transparent(testingColorIconPassed, 0.7)), ( localize(
|
|
135
|
-
const testingRetiredColorIconQueued = registerColor("testing.iconQueued.retired", ( transparent(testingColorIconQueued, 0.7)), ( localize(
|
|
136
|
-
const testingRetiredColorIconUnset = registerColor("testing.iconUnset.retired", ( transparent(testingColorIconUnset, 0.7)), ( localize(
|
|
137
|
-
const testingRetiredColorIconSkipped = registerColor("testing.iconSkipped.retired", ( transparent(testingColorIconSkipped, 0.7)), ( localize(
|
|
144
|
+
const testingRetiredColorIconErrored = registerColor("testing.iconErrored.retired", ( transparent(testingColorIconErrored, 0.7)), ( localize(14760, "Retired color for the 'Errored' icon in the test explorer.")));
|
|
145
|
+
const testingRetiredColorIconFailed = registerColor("testing.iconFailed.retired", ( transparent(testingColorIconFailed, 0.7)), ( localize(14761, "Retired color for the 'failed' icon in the test explorer.")));
|
|
146
|
+
const testingRetiredColorIconPassed = registerColor("testing.iconPassed.retired", ( transparent(testingColorIconPassed, 0.7)), ( localize(14762, "Retired color for the 'passed' icon in the test explorer.")));
|
|
147
|
+
const testingRetiredColorIconQueued = registerColor("testing.iconQueued.retired", ( transparent(testingColorIconQueued, 0.7)), ( localize(14763, "Retired color for the 'Queued' icon in the test explorer.")));
|
|
148
|
+
const testingRetiredColorIconUnset = registerColor("testing.iconUnset.retired", ( transparent(testingColorIconUnset, 0.7)), ( localize(14764, "Retired color for the 'Unset' icon in the test explorer.")));
|
|
149
|
+
const testingRetiredColorIconSkipped = registerColor("testing.iconSkipped.retired", ( transparent(testingColorIconSkipped, 0.7)), ( localize(14765, "Retired color for the 'Skipped' icon in the test explorer.")));
|
|
138
150
|
const testStatesToRetiredIconColors = {
|
|
139
151
|
[TestResultState.Errored]: testingRetiredColorIconErrored,
|
|
140
152
|
[TestResultState.Failed]: testingRetiredColorIconFailed,
|
|
@@ -173,4 +185,4 @@ registerThemingParticipant((theme, collector) => {
|
|
|
173
185
|
}
|
|
174
186
|
});
|
|
175
187
|
|
|
176
|
-
export { testStatesToIconColors, testStatesToRetiredIconColors, testingColorIconErrored, testingColorIconFailed, testingColorIconPassed, testingColorIconQueued, testingColorIconSkipped, testingColorIconUnset, testingColorRunAction, testingCoveredBackground, testingCoveredBorder, testingMessagePeekBorder, testingPeekBorder, testingPeekHeaderBackground, testingPeekMessageHeaderBackground, testingRetiredColorIconErrored, testingRetiredColorIconFailed, testingRetiredColorIconPassed, testingRetiredColorIconQueued, testingRetiredColorIconSkipped, testingRetiredColorIconUnset, testingUncoveredBackground, testingUncoveredBorder };
|
|
188
|
+
export { testStatesToIconColors, testStatesToRetiredIconColors, testingColorIconErrored, testingColorIconFailed, testingColorIconPassed, testingColorIconQueued, testingColorIconSkipped, testingColorIconUnset, testingColorRunAction, testingCoveredBackground, testingCoveredBorder, testingCoveredMinimapBackground, testingMessagePeekBorder, testingPeekBorder, testingPeekHeaderBackground, testingPeekMessageHeaderBackground, testingRetiredColorIconErrored, testingRetiredColorIconFailed, testingRetiredColorIconPassed, testingRetiredColorIconQueued, testingRetiredColorIconSkipped, testingRetiredColorIconUnset, testingUncoveredBackground, testingUncoveredBorder, testingUncoveredMinimapBackground };
|
|
@@ -15,6 +15,7 @@ export declare enum TestingConfigKeys {
|
|
|
15
15
|
ShowCoverageInExplorer = "testing.showCoverageInExplorer",
|
|
16
16
|
CoverageBarThresholds = "testing.coverageBarThresholds",
|
|
17
17
|
CoverageToolbarEnabled = "testing.coverageToolbarEnabled",
|
|
18
|
+
CoverageMinimapEnabled = "testing.coverageMinimapEnabled",
|
|
18
19
|
ResultsViewLayout = "testing.resultsView.layout"
|
|
19
20
|
}
|
|
20
21
|
export declare enum AutoOpenTesting {
|
|
@@ -70,6 +71,7 @@ export interface ITestingConfiguration {
|
|
|
70
71
|
[TestingConfigKeys.ShowCoverageInExplorer]: boolean;
|
|
71
72
|
[TestingConfigKeys.CoverageBarThresholds]: ITestingCoverageBarThresholds;
|
|
72
73
|
[TestingConfigKeys.CoverageToolbarEnabled]: boolean;
|
|
74
|
+
[TestingConfigKeys.CoverageMinimapEnabled]: boolean;
|
|
73
75
|
[TestingConfigKeys.ResultsViewLayout]: TestingResultsViewLayout;
|
|
74
76
|
}
|
|
75
77
|
export declare const getTestingConfiguration: <K extends TestingConfigKeys>(config: IConfigurationService, key: K) => ITestingConfiguration[K];
|
|
@@ -21,6 +21,7 @@ var TestingConfigKeys;
|
|
|
21
21
|
TestingConfigKeys["ShowCoverageInExplorer"] = "testing.showCoverageInExplorer";
|
|
22
22
|
TestingConfigKeys["CoverageBarThresholds"] = "testing.coverageBarThresholds";
|
|
23
23
|
TestingConfigKeys["CoverageToolbarEnabled"] = "testing.coverageToolbarEnabled";
|
|
24
|
+
TestingConfigKeys["CoverageMinimapEnabled"] = "testing.coverageMinimapEnabled";
|
|
24
25
|
TestingConfigKeys["ResultsViewLayout"] = "testing.resultsView.layout";
|
|
25
26
|
})(TestingConfigKeys || (TestingConfigKeys = {}));
|
|
26
27
|
var AutoOpenTesting;
|
|
@@ -64,46 +65,46 @@ var TestingResultsViewLayout;
|
|
|
64
65
|
const testingConfiguration = {
|
|
65
66
|
id: "testing",
|
|
66
67
|
order: 21,
|
|
67
|
-
title: ( localize(
|
|
68
|
+
title: ( localize(14766, "Testing")),
|
|
68
69
|
type: "object",
|
|
69
70
|
properties: {
|
|
70
71
|
[TestingConfigKeys.AutoOpenPeekView]: {
|
|
71
|
-
description: ( localize(
|
|
72
|
+
description: ( localize(14767, "Configures when the error Peek view is automatically opened.")),
|
|
72
73
|
enum: [
|
|
73
74
|
AutoOpenPeekViewWhen.FailureAnywhere,
|
|
74
75
|
AutoOpenPeekViewWhen.FailureVisible,
|
|
75
76
|
AutoOpenPeekViewWhen.Never
|
|
76
77
|
],
|
|
77
78
|
default: AutoOpenPeekViewWhen.Never,
|
|
78
|
-
enumDescriptions: [( localize(
|
|
79
|
+
enumDescriptions: [( localize(14768, "Open automatically no matter where the failure is.")), ( localize(14769, "Open automatically when a test fails in a visible document.")), ( localize(14770, "Never automatically open."))]
|
|
79
80
|
},
|
|
80
81
|
[TestingConfigKeys.ShowAllMessages]: {
|
|
81
|
-
description: ( localize(
|
|
82
|
+
description: ( localize(14771, "Controls whether to show messages from all test runs.")),
|
|
82
83
|
type: "boolean",
|
|
83
84
|
default: false
|
|
84
85
|
},
|
|
85
86
|
[TestingConfigKeys.AutoOpenPeekViewDuringContinuousRun]: {
|
|
86
87
|
description: ( localize(
|
|
87
|
-
|
|
88
|
+
14772,
|
|
88
89
|
"Controls whether to automatically open the Peek view during continuous run mode."
|
|
89
90
|
)),
|
|
90
91
|
type: "boolean",
|
|
91
92
|
default: false
|
|
92
93
|
},
|
|
93
94
|
[TestingConfigKeys.CountBadge]: {
|
|
94
|
-
description: ( localize(
|
|
95
|
+
description: ( localize(14773, "Controls the count badge on the Testing icon on the Activity Bar.")),
|
|
95
96
|
enum: [
|
|
96
97
|
TestingCountBadge.Failed,
|
|
97
98
|
TestingCountBadge.Off,
|
|
98
99
|
TestingCountBadge.Passed,
|
|
99
100
|
TestingCountBadge.Skipped
|
|
100
101
|
],
|
|
101
|
-
enumDescriptions: [( localize(
|
|
102
|
+
enumDescriptions: [( localize(14774, "Show the number of failed tests")), ( localize(14775, "Disable the testing count badge")), ( localize(14776, "Show the number of passed tests")), ( localize(14777, "Show the number of skipped tests"))],
|
|
102
103
|
default: TestingCountBadge.Failed
|
|
103
104
|
},
|
|
104
105
|
[TestingConfigKeys.FollowRunningTest]: {
|
|
105
106
|
description: ( localize(
|
|
106
|
-
|
|
107
|
+
14778,
|
|
107
108
|
"Controls whether the running test should be followed in the Test Explorer view."
|
|
108
109
|
)),
|
|
109
110
|
type: "boolean",
|
|
@@ -111,7 +112,7 @@ const testingConfiguration = {
|
|
|
111
112
|
},
|
|
112
113
|
[TestingConfigKeys.DefaultGutterClickAction]: {
|
|
113
114
|
description: ( localize(
|
|
114
|
-
|
|
115
|
+
14779,
|
|
115
116
|
"Controls the action to take when left-clicking on a test decoration in the gutter."
|
|
116
117
|
)),
|
|
117
118
|
enum: [
|
|
@@ -120,16 +121,16 @@ const testingConfiguration = {
|
|
|
120
121
|
DefaultGutterClickAction.Coverage,
|
|
121
122
|
DefaultGutterClickAction.ContextMenu
|
|
122
123
|
],
|
|
123
|
-
enumDescriptions: [( localize(
|
|
124
|
+
enumDescriptions: [( localize(14780, "Run the test.")), ( localize(14781, "Debug the test.")), ( localize(14782, "Run the test with coverage.")), ( localize(14783, "Open the context menu for more options."))],
|
|
124
125
|
default: DefaultGutterClickAction.Run
|
|
125
126
|
},
|
|
126
127
|
[TestingConfigKeys.GutterEnabled]: {
|
|
127
|
-
description: ( localize(
|
|
128
|
+
description: ( localize(14784, "Controls whether test decorations are shown in the editor gutter.")),
|
|
128
129
|
type: "boolean",
|
|
129
130
|
default: true
|
|
130
131
|
},
|
|
131
132
|
[TestingConfigKeys.SaveBeforeTest]: {
|
|
132
|
-
description: ( localize(
|
|
133
|
+
description: ( localize(14785, "Control whether save all dirty editors before running a test.")),
|
|
133
134
|
type: "boolean",
|
|
134
135
|
default: true
|
|
135
136
|
},
|
|
@@ -140,13 +141,13 @@ const testingConfiguration = {
|
|
|
140
141
|
AutoOpenTesting.OpenOnTestFailure,
|
|
141
142
|
AutoOpenTesting.OpenExplorerOnTestStart
|
|
142
143
|
],
|
|
143
|
-
enumDescriptions: [( localize(
|
|
144
|
+
enumDescriptions: [( localize(14786, "Never automatically open the testing views")), ( localize(14787, "Open the test results view when tests start")), ( localize(14788, "Open the test result view on any test failure")), ( localize(14789, "Open the test explorer when tests start"))],
|
|
144
145
|
default: "openOnTestStart",
|
|
145
|
-
description: ( localize(
|
|
146
|
+
description: ( localize(14790, "Controls when the testing view should open."))
|
|
146
147
|
},
|
|
147
148
|
[TestingConfigKeys.AlwaysRevealTestOnStateChange]: {
|
|
148
149
|
markdownDescription: ( localize(
|
|
149
|
-
|
|
150
|
+
14791,
|
|
150
151
|
"Always reveal the executed test when {0} is on. If this setting is turned off, only failed tests will be revealed.",
|
|
151
152
|
"`#testing.followRunningTest#`"
|
|
152
153
|
)),
|
|
@@ -154,13 +155,13 @@ const testingConfiguration = {
|
|
|
154
155
|
default: false
|
|
155
156
|
},
|
|
156
157
|
[TestingConfigKeys.ShowCoverageInExplorer]: {
|
|
157
|
-
description: ( localize(
|
|
158
|
+
description: ( localize(14792, "Whether test coverage should be down in the File Explorer view.")),
|
|
158
159
|
type: "boolean",
|
|
159
160
|
default: true
|
|
160
161
|
},
|
|
161
162
|
[TestingConfigKeys.CoveragePercent]: {
|
|
162
163
|
markdownDescription: ( localize(
|
|
163
|
-
|
|
164
|
+
14793,
|
|
164
165
|
"Configures what percentage is displayed by default for test coverage."
|
|
165
166
|
)),
|
|
166
167
|
default: TestingDisplayedCoveragePercent.TotalCoverage,
|
|
@@ -170,12 +171,12 @@ const testingConfiguration = {
|
|
|
170
171
|
TestingDisplayedCoveragePercent.Minimum
|
|
171
172
|
],
|
|
172
173
|
enumDescriptions: [( localize(
|
|
173
|
-
|
|
174
|
+
14794,
|
|
174
175
|
"A calculation of the combined statement, function, and branch coverage."
|
|
175
|
-
)), ( localize(
|
|
176
|
+
)), ( localize(14795, "The statement coverage.")), ( localize(14796, "The minimum of statement, function, and branch coverage."))]
|
|
176
177
|
},
|
|
177
178
|
[TestingConfigKeys.CoverageBarThresholds]: {
|
|
178
|
-
markdownDescription: ( localize(
|
|
179
|
+
markdownDescription: ( localize(14797, "Configures the colors used for percentages in test coverage bars.")),
|
|
179
180
|
default: {
|
|
180
181
|
red: 0,
|
|
181
182
|
yellow: 60,
|
|
@@ -203,18 +204,23 @@ const testingConfiguration = {
|
|
|
203
204
|
}
|
|
204
205
|
},
|
|
205
206
|
[TestingConfigKeys.CoverageToolbarEnabled]: {
|
|
206
|
-
description: ( localize(
|
|
207
|
+
description: ( localize(14798, "Controls whether the coverage toolbar is shown in the editor.")),
|
|
207
208
|
type: "boolean",
|
|
208
209
|
default: false
|
|
209
210
|
},
|
|
211
|
+
[TestingConfigKeys.CoverageMinimapEnabled]: {
|
|
212
|
+
description: ( localize(14799, "Controls whether coverage indicators are shown in the minimap.")),
|
|
213
|
+
type: "boolean",
|
|
214
|
+
default: true
|
|
215
|
+
},
|
|
210
216
|
[TestingConfigKeys.ResultsViewLayout]: {
|
|
211
|
-
description: ( localize(
|
|
217
|
+
description: ( localize(14800, "Controls the layout of the Test Results view.")),
|
|
212
218
|
enum: [TestingResultsViewLayout.TreeRight, TestingResultsViewLayout.TreeLeft],
|
|
213
219
|
enumDescriptions: [( localize(
|
|
214
|
-
|
|
220
|
+
14801,
|
|
215
221
|
"Show the test run tree on the right side with details on the left."
|
|
216
222
|
)), ( localize(
|
|
217
|
-
|
|
223
|
+
14802,
|
|
218
224
|
"Show the test run tree on the left side with details on the right."
|
|
219
225
|
))],
|
|
220
226
|
default: TestingResultsViewLayout.TreeRight
|
|
@@ -51,10 +51,13 @@ let TestExplorerFilterState = class TestExplorerFilterState extends Disposable {
|
|
|
51
51
|
for (const match of text.matchAll(tagRe)) {
|
|
52
52
|
let nextIndex = match.index + match[0].length;
|
|
53
53
|
const tag = match[0];
|
|
54
|
-
|
|
54
|
+
const isFilterTerm = allTestFilterTerms.includes(tag);
|
|
55
|
+
if (isFilterTerm) {
|
|
55
56
|
this.termFilterState[tag] = true;
|
|
56
57
|
}
|
|
58
|
+
let isTag = false;
|
|
57
59
|
if (text[nextIndex] === ":") {
|
|
60
|
+
isTag = true;
|
|
58
61
|
nextIndex++;
|
|
59
62
|
let delimiter = text[nextIndex];
|
|
60
63
|
if (delimiter !== `"` && delimiter !== `'`) {
|
|
@@ -79,6 +82,9 @@ let TestExplorerFilterState = class TestExplorerFilterState extends Disposable {
|
|
|
79
82
|
}
|
|
80
83
|
nextIndex++;
|
|
81
84
|
}
|
|
85
|
+
if (!isFilterTerm && !isTag) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
82
88
|
globText += text.slice(lastIndex, match.index);
|
|
83
89
|
lastIndex = nextIndex;
|
|
84
90
|
}
|
|
@@ -164,7 +164,7 @@ let TestService = class TestService extends Disposable {
|
|
|
164
164
|
req.exclude = [...this.excluded.all];
|
|
165
165
|
}
|
|
166
166
|
const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({
|
|
167
|
-
message: ( localize(
|
|
167
|
+
message: ( localize(14816, "Running tests may execute code in your workspace."))
|
|
168
168
|
});
|
|
169
169
|
if (!trust) {
|
|
170
170
|
return;
|
|
@@ -179,7 +179,7 @@ let TestService = class TestService extends Disposable {
|
|
|
179
179
|
}))), token).then(result => {
|
|
180
180
|
const errs = ( result.map(r => r.error)).filter(isDefined);
|
|
181
181
|
if (errs.length) {
|
|
182
|
-
this.notificationService.error(( localize(
|
|
182
|
+
this.notificationService.error(( localize(14817, "An error occurred attempting to run tests: {0}", errs.join(" "))));
|
|
183
183
|
}
|
|
184
184
|
})
|
|
185
185
|
));
|
|
@@ -191,7 +191,7 @@ let TestService = class TestService extends Disposable {
|
|
|
191
191
|
}
|
|
192
192
|
const result = this.testResults.createLiveResult(req);
|
|
193
193
|
const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({
|
|
194
|
-
message: ( localize(
|
|
194
|
+
message: ( localize(14816, "Running tests may execute code in your workspace."))
|
|
195
195
|
});
|
|
196
196
|
if (!trust) {
|
|
197
197
|
result.markComplete();
|
|
@@ -211,7 +211,7 @@ let TestService = class TestService extends Disposable {
|
|
|
211
211
|
}))), cancelSource.token).then(result => {
|
|
212
212
|
const errs = ( result.map(r => r.error)).filter(isDefined);
|
|
213
213
|
if (errs.length) {
|
|
214
|
-
this.notificationService.error(( localize(
|
|
214
|
+
this.notificationService.error(( localize(14817, "An error occurred attempting to run tests: {0}", errs.join(" "))));
|
|
215
215
|
}
|
|
216
216
|
})
|
|
217
217
|
));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
4
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
4
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
6
5
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
@@ -8,13 +7,13 @@ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/w
|
|
|
8
7
|
import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
9
8
|
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
10
9
|
import { FileCoverage, TestCoverage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testCoverage";
|
|
11
|
-
import { LiveTestResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResult";
|
|
10
|
+
import { ITestResult, LiveTestResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResult";
|
|
12
11
|
import { ITestResultService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResultService.service";
|
|
13
12
|
import { ITestService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testService.service";
|
|
14
13
|
import { ITestProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testProfileService.service";
|
|
15
14
|
export declare class TestingChatAgentToolContribution extends Disposable implements IWorkbenchContribution {
|
|
16
15
|
static readonly ID = "workbench.contrib.testing.chatAgentTool";
|
|
17
|
-
constructor(instantiationService: IInstantiationService, toolsService: ILanguageModelToolsService
|
|
16
|
+
constructor(instantiationService: IInstantiationService, toolsService: ILanguageModelToolsService);
|
|
18
17
|
}
|
|
19
18
|
type Mode = "run" | "coverage";
|
|
20
19
|
export declare class RunTestTool implements IToolImpl {
|
|
@@ -42,6 +41,14 @@ export declare class RunTestTool implements IToolImpl {
|
|
|
42
41
|
private _getFileTestsToRun;
|
|
43
42
|
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
44
43
|
}
|
|
44
|
+
export declare class TestFailureTool implements IToolImpl {
|
|
45
|
+
private readonly _testResultService;
|
|
46
|
+
static readonly ID = "testFailure";
|
|
47
|
+
static readonly DEFINITION: IToolData;
|
|
48
|
+
constructor(_testResultService: ITestResultService);
|
|
49
|
+
invoke(invocation: IToolInvocation, countTokens: CountTokensCallback, progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
50
|
+
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
51
|
+
}
|
|
45
52
|
/** Builds the full summary string for a completed test run. */
|
|
46
53
|
export declare function buildTestRunSummary(result: LiveTestResult, mode: Mode, coverageFiles: string[] | undefined): Promise<string>;
|
|
47
54
|
/** Gets a coverage summary from a test result, either overall or per-file. */
|
|
@@ -56,5 +63,5 @@ export declare function mergeLineRanges(ranges: [
|
|
|
56
63
|
number
|
|
57
64
|
][]): string;
|
|
58
65
|
/** Formats failure details from a test result into an XML-like string. */
|
|
59
|
-
export declare function getFailureDetails(result:
|
|
66
|
+
export declare function getFailureDetails(result: ITestResult): Promise<string>;
|
|
60
67
|
export {};
|