@codingame/monaco-vscode-testing-service-override 28.4.1 → 29.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/debug/browser/callStackWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +21 -21
- 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 +15 -15
- 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 +22 -22
- 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 +15 -15
- 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 +24 -24
- package/vscode/src/vs/workbench/contrib/testing/common/testResultService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.js +191 -126
- 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
|
@@ -19,36 +19,36 @@ const testingColorIconFailed = registerColor("testing.iconFailed", {
|
|
|
19
19
|
light: "#f14c4c",
|
|
20
20
|
hcDark: "#f14c4c",
|
|
21
21
|
hcLight: "#B5200D"
|
|
22
|
-
}, ( localize(
|
|
22
|
+
}, ( localize(14498, "Color for the 'failed' icon in the test explorer.")));
|
|
23
23
|
const testingColorIconErrored = registerColor("testing.iconErrored", {
|
|
24
24
|
dark: "#f14c4c",
|
|
25
25
|
light: "#f14c4c",
|
|
26
26
|
hcDark: "#f14c4c",
|
|
27
27
|
hcLight: "#B5200D"
|
|
28
|
-
}, ( localize(
|
|
28
|
+
}, ( localize(14499, "Color for the 'Errored' icon in the test explorer.")));
|
|
29
29
|
const testingColorIconPassed = registerColor("testing.iconPassed", {
|
|
30
30
|
dark: "#73c991",
|
|
31
31
|
light: "#73c991",
|
|
32
32
|
hcDark: "#73c991",
|
|
33
33
|
hcLight: "#007100"
|
|
34
|
-
}, ( localize(
|
|
35
|
-
const testingColorRunAction = registerColor("testing.runAction", testingColorIconPassed, ( localize(
|
|
36
|
-
const testingColorIconQueued = registerColor("testing.iconQueued", "#cca700", ( localize(
|
|
37
|
-
const testingColorIconUnset = registerColor("testing.iconUnset", "#848484", ( localize(
|
|
38
|
-
const testingColorIconSkipped = registerColor("testing.iconSkipped", "#848484", ( localize(
|
|
34
|
+
}, ( localize(14500, "Color for the 'passed' icon in the test explorer.")));
|
|
35
|
+
const testingColorRunAction = registerColor("testing.runAction", testingColorIconPassed, ( localize(14501, "Color for 'run' icons in the editor.")));
|
|
36
|
+
const testingColorIconQueued = registerColor("testing.iconQueued", "#cca700", ( localize(14502, "Color for the 'Queued' icon in the test explorer.")));
|
|
37
|
+
const testingColorIconUnset = registerColor("testing.iconUnset", "#848484", ( localize(14503, "Color for the 'Unset' icon in the test explorer.")));
|
|
38
|
+
const testingColorIconSkipped = registerColor("testing.iconSkipped", "#848484", ( localize(14504, "Color for the 'Skipped' icon in the test explorer.")));
|
|
39
39
|
const testingPeekBorder = registerColor("testing.peekBorder", {
|
|
40
40
|
dark: editorErrorForeground,
|
|
41
41
|
light: editorErrorForeground,
|
|
42
42
|
hcDark: contrastBorder,
|
|
43
43
|
hcLight: contrastBorder
|
|
44
|
-
}, ( localize(
|
|
44
|
+
}, ( localize(14505, "Color of the peek view borders and arrow.")));
|
|
45
45
|
const testingMessagePeekBorder = registerColor("testing.messagePeekBorder", {
|
|
46
46
|
dark: editorInfoForeground,
|
|
47
47
|
light: editorInfoForeground,
|
|
48
48
|
hcDark: contrastBorder,
|
|
49
49
|
hcLight: contrastBorder
|
|
50
50
|
}, ( localize(
|
|
51
|
-
|
|
51
|
+
14506,
|
|
52
52
|
"Color of the peek view borders and arrow when peeking a logged message."
|
|
53
53
|
)));
|
|
54
54
|
const testingPeekHeaderBackground = registerColor("testing.peekHeaderBackground", {
|
|
@@ -56,14 +56,14 @@ const testingPeekHeaderBackground = registerColor("testing.peekHeaderBackground"
|
|
|
56
56
|
light: ( transparent(editorErrorForeground, 0.1)),
|
|
57
57
|
hcDark: null,
|
|
58
58
|
hcLight: null
|
|
59
|
-
}, ( localize(
|
|
59
|
+
}, ( localize(14505, "Color of the peek view borders and arrow.")));
|
|
60
60
|
const testingPeekMessageHeaderBackground = registerColor("testing.messagePeekHeaderBackground", {
|
|
61
61
|
dark: ( transparent(editorInfoForeground, 0.1)),
|
|
62
62
|
light: ( transparent(editorInfoForeground, 0.1)),
|
|
63
63
|
hcDark: null,
|
|
64
64
|
hcLight: null
|
|
65
65
|
}, ( localize(
|
|
66
|
-
|
|
66
|
+
14507,
|
|
67
67
|
"Color of the peek view borders and arrow when peeking a logged message."
|
|
68
68
|
)));
|
|
69
69
|
const testingCoveredBackground = registerColor("testing.coveredBackground", {
|
|
@@ -71,66 +71,66 @@ const testingCoveredBackground = registerColor("testing.coveredBackground", {
|
|
|
71
71
|
light: diffInserted,
|
|
72
72
|
hcDark: null,
|
|
73
73
|
hcLight: null
|
|
74
|
-
}, ( localize(
|
|
74
|
+
}, ( localize(14508, "Background color of text that was covered.")));
|
|
75
75
|
const testingCoveredBorder = registerColor("testing.coveredBorder", {
|
|
76
76
|
dark: ( transparent(testingCoveredBackground, 0.75)),
|
|
77
77
|
light: ( transparent(testingCoveredBackground, 0.75)),
|
|
78
78
|
hcDark: contrastBorder,
|
|
79
79
|
hcLight: contrastBorder
|
|
80
|
-
}, ( localize(
|
|
80
|
+
}, ( localize(14509, "Border color of text that was covered.")));
|
|
81
81
|
registerColor("testing.coveredGutterBackground", {
|
|
82
82
|
dark: ( transparent(diffInserted, 0.6)),
|
|
83
83
|
light: ( transparent(diffInserted, 0.6)),
|
|
84
84
|
hcDark: chartsGreen,
|
|
85
85
|
hcLight: chartsGreen
|
|
86
|
-
}, ( localize(
|
|
86
|
+
}, ( localize(14510, "Gutter color of regions where code was covered.")));
|
|
87
87
|
registerColor("testing.uncoveredBranchBackground", {
|
|
88
88
|
dark: opaque(( transparent(diffRemoved, 2)), editorBackground),
|
|
89
89
|
light: opaque(( transparent(diffRemoved, 2)), editorBackground),
|
|
90
90
|
hcDark: null,
|
|
91
91
|
hcLight: null
|
|
92
|
-
}, ( localize(
|
|
92
|
+
}, ( localize(14511, "Background of the widget shown for an uncovered branch.")));
|
|
93
93
|
const testingUncoveredBackground = registerColor("testing.uncoveredBackground", {
|
|
94
94
|
dark: diffRemoved,
|
|
95
95
|
light: diffRemoved,
|
|
96
96
|
hcDark: null,
|
|
97
97
|
hcLight: null
|
|
98
|
-
}, ( localize(
|
|
98
|
+
}, ( localize(14512, "Background color of text that was not covered.")));
|
|
99
99
|
const testingUncoveredBorder = registerColor("testing.uncoveredBorder", {
|
|
100
100
|
dark: ( transparent(testingUncoveredBackground, 0.75)),
|
|
101
101
|
light: ( transparent(testingUncoveredBackground, 0.75)),
|
|
102
102
|
hcDark: contrastBorder,
|
|
103
103
|
hcLight: contrastBorder
|
|
104
|
-
}, ( localize(
|
|
104
|
+
}, ( localize(14513, "Border color of text that was not covered.")));
|
|
105
105
|
registerColor("testing.uncoveredGutterBackground", {
|
|
106
106
|
dark: ( transparent(diffRemoved, 1.5)),
|
|
107
107
|
light: ( transparent(diffRemoved, 1.5)),
|
|
108
108
|
hcDark: chartsRed,
|
|
109
109
|
hcLight: chartsRed
|
|
110
|
-
}, ( localize(
|
|
111
|
-
registerColor("testing.coverCountBadgeBackground", badgeBackground, ( localize(
|
|
112
|
-
registerColor("testing.coverCountBadgeForeground", badgeForeground, ( localize(
|
|
110
|
+
}, ( localize(14514, "Gutter color of regions where code not covered.")));
|
|
111
|
+
registerColor("testing.coverCountBadgeBackground", badgeBackground, ( localize(14515, "Background for the badge indicating execution count")));
|
|
112
|
+
registerColor("testing.coverCountBadgeForeground", badgeForeground, ( localize(14516, "Foreground for the badge indicating execution count")));
|
|
113
113
|
const messageBadgeBackground = registerColor(
|
|
114
114
|
"testing.message.error.badgeBackground",
|
|
115
115
|
activityErrorBadgeBackground,
|
|
116
116
|
( localize(
|
|
117
|
-
|
|
117
|
+
14517,
|
|
118
118
|
"Background color of test error messages shown inline in the editor."
|
|
119
119
|
))
|
|
120
120
|
);
|
|
121
121
|
registerColor(
|
|
122
122
|
"testing.message.error.badgeBorder",
|
|
123
123
|
messageBadgeBackground,
|
|
124
|
-
( localize(
|
|
124
|
+
( localize(14518, "Border color of test error messages shown inline in the editor."))
|
|
125
125
|
);
|
|
126
126
|
registerColor(
|
|
127
127
|
"testing.message.error.badgeForeground",
|
|
128
128
|
activityErrorBadgeForeground,
|
|
129
|
-
( localize(
|
|
129
|
+
( localize(14519, "Text color of test error messages shown inline in the editor."))
|
|
130
130
|
);
|
|
131
|
-
registerColor("testing.message.error.lineBackground", null, ( localize(
|
|
132
|
-
registerColor("testing.message.info.decorationForeground", ( transparent(editorForeground, 0.5)), ( localize(
|
|
133
|
-
registerColor("testing.message.info.lineBackground", null, ( localize(
|
|
131
|
+
registerColor("testing.message.error.lineBackground", null, ( localize(14520, "Margin color beside error messages shown inline in the editor.")));
|
|
132
|
+
registerColor("testing.message.info.decorationForeground", ( transparent(editorForeground, 0.5)), ( localize(14521, "Text color of test info messages shown inline in the editor.")));
|
|
133
|
+
registerColor("testing.message.info.lineBackground", null, ( localize(14522, "Margin color beside info messages shown inline in the editor.")));
|
|
134
134
|
const testStatesToIconColors = {
|
|
135
135
|
[TestResultState.Errored]: testingColorIconErrored,
|
|
136
136
|
[TestResultState.Failed]: testingColorIconFailed,
|
|
@@ -139,12 +139,12 @@ const testStatesToIconColors = {
|
|
|
139
139
|
[TestResultState.Unset]: testingColorIconUnset,
|
|
140
140
|
[TestResultState.Skipped]: testingColorIconSkipped
|
|
141
141
|
};
|
|
142
|
-
const testingRetiredColorIconErrored = registerColor("testing.iconErrored.retired", ( transparent(testingColorIconErrored, 0.7)), ( localize(
|
|
143
|
-
const testingRetiredColorIconFailed = registerColor("testing.iconFailed.retired", ( transparent(testingColorIconFailed, 0.7)), ( localize(
|
|
144
|
-
const testingRetiredColorIconPassed = registerColor("testing.iconPassed.retired", ( transparent(testingColorIconPassed, 0.7)), ( localize(
|
|
145
|
-
const testingRetiredColorIconQueued = registerColor("testing.iconQueued.retired", ( transparent(testingColorIconQueued, 0.7)), ( localize(
|
|
146
|
-
const testingRetiredColorIconUnset = registerColor("testing.iconUnset.retired", ( transparent(testingColorIconUnset, 0.7)), ( localize(
|
|
147
|
-
const testingRetiredColorIconSkipped = registerColor("testing.iconSkipped.retired", ( transparent(testingColorIconSkipped, 0.7)), ( localize(
|
|
142
|
+
const testingRetiredColorIconErrored = registerColor("testing.iconErrored.retired", ( transparent(testingColorIconErrored, 0.7)), ( localize(14523, "Retired color for the 'Errored' icon in the test explorer.")));
|
|
143
|
+
const testingRetiredColorIconFailed = registerColor("testing.iconFailed.retired", ( transparent(testingColorIconFailed, 0.7)), ( localize(14524, "Retired color for the 'failed' icon in the test explorer.")));
|
|
144
|
+
const testingRetiredColorIconPassed = registerColor("testing.iconPassed.retired", ( transparent(testingColorIconPassed, 0.7)), ( localize(14525, "Retired color for the 'passed' icon in the test explorer.")));
|
|
145
|
+
const testingRetiredColorIconQueued = registerColor("testing.iconQueued.retired", ( transparent(testingColorIconQueued, 0.7)), ( localize(14526, "Retired color for the 'Queued' icon in the test explorer.")));
|
|
146
|
+
const testingRetiredColorIconUnset = registerColor("testing.iconUnset.retired", ( transparent(testingColorIconUnset, 0.7)), ( localize(14527, "Retired color for the 'Unset' icon in the test explorer.")));
|
|
147
|
+
const testingRetiredColorIconSkipped = registerColor("testing.iconSkipped.retired", ( transparent(testingColorIconSkipped, 0.7)), ( localize(14528, "Retired color for the 'Skipped' icon in the test explorer.")));
|
|
148
148
|
const testStatesToRetiredIconColors = {
|
|
149
149
|
[TestResultState.Errored]: testingRetiredColorIconErrored,
|
|
150
150
|
[TestResultState.Failed]: testingRetiredColorIconFailed,
|
|
@@ -64,46 +64,46 @@ var TestingResultsViewLayout;
|
|
|
64
64
|
const testingConfiguration = {
|
|
65
65
|
id: "testing",
|
|
66
66
|
order: 21,
|
|
67
|
-
title: ( localize(
|
|
67
|
+
title: ( localize(14529, "Testing")),
|
|
68
68
|
type: "object",
|
|
69
69
|
properties: {
|
|
70
70
|
[TestingConfigKeys.AutoOpenPeekView]: {
|
|
71
|
-
description: ( localize(
|
|
71
|
+
description: ( localize(14530, "Configures when the error Peek view is automatically opened.")),
|
|
72
72
|
enum: [
|
|
73
73
|
AutoOpenPeekViewWhen.FailureAnywhere,
|
|
74
74
|
AutoOpenPeekViewWhen.FailureVisible,
|
|
75
75
|
AutoOpenPeekViewWhen.Never
|
|
76
76
|
],
|
|
77
77
|
default: AutoOpenPeekViewWhen.Never,
|
|
78
|
-
enumDescriptions: [( localize(
|
|
78
|
+
enumDescriptions: [( localize(14531, "Open automatically no matter where the failure is.")), ( localize(14532, "Open automatically when a test fails in a visible document.")), ( localize(14533, "Never automatically open."))]
|
|
79
79
|
},
|
|
80
80
|
[TestingConfigKeys.ShowAllMessages]: {
|
|
81
|
-
description: ( localize(
|
|
81
|
+
description: ( localize(14534, "Controls whether to show messages from all test runs.")),
|
|
82
82
|
type: "boolean",
|
|
83
83
|
default: false
|
|
84
84
|
},
|
|
85
85
|
[TestingConfigKeys.AutoOpenPeekViewDuringContinuousRun]: {
|
|
86
86
|
description: ( localize(
|
|
87
|
-
|
|
87
|
+
14535,
|
|
88
88
|
"Controls whether to automatically open the Peek view during continuous run mode."
|
|
89
89
|
)),
|
|
90
90
|
type: "boolean",
|
|
91
91
|
default: false
|
|
92
92
|
},
|
|
93
93
|
[TestingConfigKeys.CountBadge]: {
|
|
94
|
-
description: ( localize(
|
|
94
|
+
description: ( localize(14536, "Controls the count badge on the Testing icon on the Activity Bar.")),
|
|
95
95
|
enum: [
|
|
96
96
|
TestingCountBadge.Failed,
|
|
97
97
|
TestingCountBadge.Off,
|
|
98
98
|
TestingCountBadge.Passed,
|
|
99
99
|
TestingCountBadge.Skipped
|
|
100
100
|
],
|
|
101
|
-
enumDescriptions: [( localize(
|
|
101
|
+
enumDescriptions: [( localize(14537, "Show the number of failed tests")), ( localize(14538, "Disable the testing count badge")), ( localize(14539, "Show the number of passed tests")), ( localize(14540, "Show the number of skipped tests"))],
|
|
102
102
|
default: TestingCountBadge.Failed
|
|
103
103
|
},
|
|
104
104
|
[TestingConfigKeys.FollowRunningTest]: {
|
|
105
105
|
description: ( localize(
|
|
106
|
-
|
|
106
|
+
14541,
|
|
107
107
|
"Controls whether the running test should be followed in the Test Explorer view."
|
|
108
108
|
)),
|
|
109
109
|
type: "boolean",
|
|
@@ -111,7 +111,7 @@ const testingConfiguration = {
|
|
|
111
111
|
},
|
|
112
112
|
[TestingConfigKeys.DefaultGutterClickAction]: {
|
|
113
113
|
description: ( localize(
|
|
114
|
-
|
|
114
|
+
14542,
|
|
115
115
|
"Controls the action to take when left-clicking on a test decoration in the gutter."
|
|
116
116
|
)),
|
|
117
117
|
enum: [
|
|
@@ -120,16 +120,16 @@ const testingConfiguration = {
|
|
|
120
120
|
DefaultGutterClickAction.Coverage,
|
|
121
121
|
DefaultGutterClickAction.ContextMenu
|
|
122
122
|
],
|
|
123
|
-
enumDescriptions: [( localize(
|
|
123
|
+
enumDescriptions: [( localize(14543, "Run the test.")), ( localize(14544, "Debug the test.")), ( localize(14545, "Run the test with coverage.")), ( localize(14546, "Open the context menu for more options."))],
|
|
124
124
|
default: DefaultGutterClickAction.Run
|
|
125
125
|
},
|
|
126
126
|
[TestingConfigKeys.GutterEnabled]: {
|
|
127
|
-
description: ( localize(
|
|
127
|
+
description: ( localize(14547, "Controls whether test decorations are shown in the editor gutter.")),
|
|
128
128
|
type: "boolean",
|
|
129
129
|
default: true
|
|
130
130
|
},
|
|
131
131
|
[TestingConfigKeys.SaveBeforeTest]: {
|
|
132
|
-
description: ( localize(
|
|
132
|
+
description: ( localize(14548, "Control whether save all dirty editors before running a test.")),
|
|
133
133
|
type: "boolean",
|
|
134
134
|
default: true
|
|
135
135
|
},
|
|
@@ -140,13 +140,13 @@ const testingConfiguration = {
|
|
|
140
140
|
AutoOpenTesting.OpenOnTestFailure,
|
|
141
141
|
AutoOpenTesting.OpenExplorerOnTestStart
|
|
142
142
|
],
|
|
143
|
-
enumDescriptions: [( localize(
|
|
143
|
+
enumDescriptions: [( localize(14549, "Never automatically open the testing views")), ( localize(14550, "Open the test results view when tests start")), ( localize(14551, "Open the test result view on any test failure")), ( localize(14552, "Open the test explorer when tests start"))],
|
|
144
144
|
default: "openOnTestStart",
|
|
145
|
-
description: ( localize(
|
|
145
|
+
description: ( localize(14553, "Controls when the testing view should open."))
|
|
146
146
|
},
|
|
147
147
|
[TestingConfigKeys.AlwaysRevealTestOnStateChange]: {
|
|
148
148
|
markdownDescription: ( localize(
|
|
149
|
-
|
|
149
|
+
14554,
|
|
150
150
|
"Always reveal the executed test when {0} is on. If this setting is turned off, only failed tests will be revealed.",
|
|
151
151
|
"`#testing.followRunningTest#`"
|
|
152
152
|
)),
|
|
@@ -154,13 +154,13 @@ const testingConfiguration = {
|
|
|
154
154
|
default: false
|
|
155
155
|
},
|
|
156
156
|
[TestingConfigKeys.ShowCoverageInExplorer]: {
|
|
157
|
-
description: ( localize(
|
|
157
|
+
description: ( localize(14555, "Whether test coverage should be down in the File Explorer view.")),
|
|
158
158
|
type: "boolean",
|
|
159
159
|
default: true
|
|
160
160
|
},
|
|
161
161
|
[TestingConfigKeys.CoveragePercent]: {
|
|
162
162
|
markdownDescription: ( localize(
|
|
163
|
-
|
|
163
|
+
14556,
|
|
164
164
|
"Configures what percentage is displayed by default for test coverage."
|
|
165
165
|
)),
|
|
166
166
|
default: TestingDisplayedCoveragePercent.TotalCoverage,
|
|
@@ -170,12 +170,12 @@ const testingConfiguration = {
|
|
|
170
170
|
TestingDisplayedCoveragePercent.Minimum
|
|
171
171
|
],
|
|
172
172
|
enumDescriptions: [( localize(
|
|
173
|
-
|
|
173
|
+
14557,
|
|
174
174
|
"A calculation of the combined statement, function, and branch coverage."
|
|
175
|
-
)), ( localize(
|
|
175
|
+
)), ( localize(14558, "The statement coverage.")), ( localize(14559, "The minimum of statement, function, and branch coverage."))]
|
|
176
176
|
},
|
|
177
177
|
[TestingConfigKeys.CoverageBarThresholds]: {
|
|
178
|
-
markdownDescription: ( localize(
|
|
178
|
+
markdownDescription: ( localize(14560, "Configures the colors used for percentages in test coverage bars.")),
|
|
179
179
|
default: {
|
|
180
180
|
red: 0,
|
|
181
181
|
yellow: 60,
|
|
@@ -203,18 +203,18 @@ const testingConfiguration = {
|
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
[TestingConfigKeys.CoverageToolbarEnabled]: {
|
|
206
|
-
description: ( localize(
|
|
206
|
+
description: ( localize(14561, "Controls whether the coverage toolbar is shown in the editor.")),
|
|
207
207
|
type: "boolean",
|
|
208
208
|
default: false
|
|
209
209
|
},
|
|
210
210
|
[TestingConfigKeys.ResultsViewLayout]: {
|
|
211
|
-
description: ( localize(
|
|
211
|
+
description: ( localize(14562, "Controls the layout of the Test Results view.")),
|
|
212
212
|
enum: [TestingResultsViewLayout.TreeRight, TestingResultsViewLayout.TreeLeft],
|
|
213
213
|
enumDescriptions: [( localize(
|
|
214
|
-
|
|
214
|
+
14563,
|
|
215
215
|
"Show the test run tree on the right side with details on the left."
|
|
216
216
|
)), ( localize(
|
|
217
|
-
|
|
217
|
+
14564,
|
|
218
218
|
"Show the test run tree on the left side with details on the right."
|
|
219
219
|
))],
|
|
220
220
|
default: TestingResultsViewLayout.TreeRight
|
|
@@ -41,7 +41,7 @@ export declare class TestResultService extends Disposable implements ITestResult
|
|
|
41
41
|
private readonly isRunning;
|
|
42
42
|
private readonly hasAnyResults;
|
|
43
43
|
private readonly loadResults;
|
|
44
|
-
protected readonly persistScheduler: RunOnceScheduler
|
|
44
|
+
protected readonly persistScheduler: RunOnceScheduler<() => Promise<void>>;
|
|
45
45
|
constructor(contextKeyService: IContextKeyService, storage: ITestResultStorage, testProfiles: ITestProfileService, telemetryService: ITelemetryService);
|
|
46
46
|
/**
|
|
47
47
|
* @inheritdoc
|
|
@@ -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(14578, "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(14579, "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(14578, "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(14579, "An error occurred attempting to run tests: {0}", errs.join(" "))));
|
|
215
215
|
}
|
|
216
216
|
})
|
|
217
217
|
));
|
|
@@ -1,9 +1,60 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
1
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
3
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
3
4
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
6
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
4
7
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
8
|
+
import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
5
9
|
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
10
|
+
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";
|
|
12
|
+
import { ITestResultService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResultService.service";
|
|
13
|
+
import { ITestService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testService.service";
|
|
14
|
+
import { ITestProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testProfileService.service";
|
|
6
15
|
export declare class TestingChatAgentToolContribution extends Disposable implements IWorkbenchContribution {
|
|
7
16
|
static readonly ID = "workbench.contrib.testing.chatAgentTool";
|
|
8
17
|
constructor(instantiationService: IInstantiationService, toolsService: ILanguageModelToolsService, contextKeyService: IContextKeyService);
|
|
9
18
|
}
|
|
19
|
+
type Mode = "run" | "coverage";
|
|
20
|
+
export declare class RunTestTool implements IToolImpl {
|
|
21
|
+
private readonly _testService;
|
|
22
|
+
private readonly _uriIdentityService;
|
|
23
|
+
private readonly _workspaceContextService;
|
|
24
|
+
private readonly _testResultService;
|
|
25
|
+
private readonly _testProfileService;
|
|
26
|
+
static readonly ID = "runTests";
|
|
27
|
+
static readonly DEFINITION: IToolData;
|
|
28
|
+
constructor(_testService: ITestService, _uriIdentityService: IUriIdentityService, _workspaceContextService: IWorkspaceContextService, _testResultService: ITestResultService, _testProfileService: ITestProfileService);
|
|
29
|
+
invoke(invocation: IToolInvocation, countTokens: CountTokensCallback, progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
30
|
+
/** Updates the UI progress as the test runs, resolving when the run is finished. */
|
|
31
|
+
private _monitorRunProgress;
|
|
32
|
+
/**
|
|
33
|
+
* Captures the test result. This is a little tricky because some extensions
|
|
34
|
+
* trigger an 'out of bound' test run, so we actually wait for the first
|
|
35
|
+
* test run to come in that contains one or more tasks and treat that as the
|
|
36
|
+
* one we're looking for.
|
|
37
|
+
*/
|
|
38
|
+
private _captureTestResult;
|
|
39
|
+
/** Filters the test files to individual test cases based on the provided parameters. */
|
|
40
|
+
private _getTestCasesToRun;
|
|
41
|
+
/** Gets the file tests to run based on the provided parameters. */
|
|
42
|
+
private _getFileTestsToRun;
|
|
43
|
+
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
44
|
+
}
|
|
45
|
+
/** Builds the full summary string for a completed test run. */
|
|
46
|
+
export declare function buildTestRunSummary(result: LiveTestResult, mode: Mode, coverageFiles: string[] | undefined): Promise<string>;
|
|
47
|
+
/** Gets a coverage summary from a test result, either overall or per-file. */
|
|
48
|
+
export declare function getCoverageSummary(result: LiveTestResult, coverageFiles: string[] | undefined): Promise<string>;
|
|
49
|
+
/** Gets a file-level coverage overview sorted by lowest coverage first. */
|
|
50
|
+
export declare function getOverallCoverageSummary(coverage: TestCoverage): string;
|
|
51
|
+
/** Gets detailed coverage information for a single file including uncovered items. */
|
|
52
|
+
export declare function getFileCoverageDetails(file: FileCoverage, path: string): Promise<string>;
|
|
53
|
+
/** Merges overlapping/contiguous line ranges and formats them compactly. */
|
|
54
|
+
export declare function mergeLineRanges(ranges: [
|
|
55
|
+
number,
|
|
56
|
+
number
|
|
57
|
+
][]): string;
|
|
58
|
+
/** Formats failure details from a test result into an XML-like string. */
|
|
59
|
+
export declare function getFailureDetails(result: LiveTestResult): Promise<string>;
|
|
60
|
+
export {};
|