@codingame/monaco-vscode-testing-service-override 26.2.1 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackWidget.js +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/explorerProjections/listProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.js +1 -1
- 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.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 +20 -20
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +13 -12
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +27 -22
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +12 -12
- 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/testExplorerFilterState.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testResultService.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +7 -7
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +31 -31
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testingProgressMessages.js +5 -5
|
@@ -69,8 +69,8 @@ class TestResultElement {
|
|
|
69
69
|
this.label = value.name;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
const openCoverageLabel = ( localize(
|
|
73
|
-
const closeCoverageLabel = ( localize(
|
|
72
|
+
const openCoverageLabel = ( localize(13951, "View Test Coverage"));
|
|
73
|
+
const closeCoverageLabel = ( localize(13952, "Close Test Coverage"));
|
|
74
74
|
class CoverageElement {
|
|
75
75
|
get label() {
|
|
76
76
|
return this.isOpen ? closeCoverageLabel : openCoverageLabel;
|
|
@@ -94,7 +94,7 @@ class OlderResultsElement {
|
|
|
94
94
|
this.n = n;
|
|
95
95
|
this.type = "older";
|
|
96
96
|
this.onDidChange = Event.None;
|
|
97
|
-
this.label = n === 1 ? ( localize(
|
|
97
|
+
this.label = n === 1 ? ( localize(13953, "1 older result")) : ( localize(13954, "{0} older results", n));
|
|
98
98
|
this.id = `older-${this.n}`;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -210,7 +210,7 @@ class TestMessageElement {
|
|
|
210
210
|
const lines = count(asPlaintext.trimEnd(), "\n");
|
|
211
211
|
this.label = firstLine(asPlaintext);
|
|
212
212
|
if (lines > 0) {
|
|
213
|
-
this.description = lines > 1 ? ( localize(
|
|
213
|
+
this.description = lines > 1 ? ( localize(13955, "+ {0} more lines", lines)) : ( localize(13956, "+ 1 more line"));
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -268,7 +268,7 @@ let OutputPeekTree = class OutputPeekTree extends Disposable {
|
|
|
268
268
|
return element.ariaLabel || element.label;
|
|
269
269
|
},
|
|
270
270
|
getWidgetAriaLabel() {
|
|
271
|
-
return localize(
|
|
271
|
+
return localize(13957, "Test Result Messages");
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
})
|
|
@@ -660,34 +660,34 @@ let TreeActionsProvider = class TreeActionsProvider {
|
|
|
660
660
|
const primary = [];
|
|
661
661
|
const secondary = [];
|
|
662
662
|
if (element instanceof TaskElement) {
|
|
663
|
-
primary.push(( new Action("testing.outputPeek.showResultOutput", ( localize(
|
|
663
|
+
primary.push(( new Action("testing.outputPeek.showResultOutput", ( localize(13958, "Show Result Output")), ThemeIcon.asClassName(Codicon.terminal), undefined, () => this.requestReveal.fire(( new TaskSubject(element.results, element.index))))));
|
|
664
664
|
if (element.task.running) {
|
|
665
|
-
primary.push(( new Action("testing.outputPeek.cancel", ( localize(
|
|
665
|
+
primary.push(( new Action("testing.outputPeek.cancel", ( localize(13959, "Cancel Test Run")), ThemeIcon.asClassName(testingCancelIcon), undefined, () => this.commandService.executeCommand(TestCommandId.CancelTestRunAction, element.results.id, element.task.id))));
|
|
666
666
|
} else {
|
|
667
|
-
primary.push(( new Action("testing.outputPeek.rerun", ( localize(
|
|
667
|
+
primary.push(( new Action("testing.outputPeek.rerun", ( localize(13960, "Rerun Last Run")), ThemeIcon.asClassName(testingRerunIcon), undefined, () => this.commandService.executeCommand(TestCommandId.ReRunLastRun, element.results.id))));
|
|
668
668
|
const hasFailedTests = ( Iterable.some(element.results.tests, test => isFailedState(test.ownComputedState)));
|
|
669
669
|
if (hasFailedTests) {
|
|
670
|
-
primary.push(( new Action("testing.outputPeek.rerunFailed", ( localize(
|
|
670
|
+
primary.push(( new Action("testing.outputPeek.rerunFailed", ( localize(13961, "Rerun Failed Tests")), ThemeIcon.asClassName(testingRerunIcon), undefined, () => this.commandService.executeCommand(TestCommandId.ReRunFailedFromLastRun, element.results.id))));
|
|
671
671
|
}
|
|
672
|
-
primary.push(( new Action("testing.outputPeek.debug", ( localize(
|
|
672
|
+
primary.push(( new Action("testing.outputPeek.debug", ( localize(13962, "Debug Last Run")), ThemeIcon.asClassName(testingDebugIcon), undefined, () => this.commandService.executeCommand(TestCommandId.DebugLastRun, element.results.id))));
|
|
673
673
|
if (hasFailedTests) {
|
|
674
|
-
primary.push(( new Action("testing.outputPeek.debugFailed", ( localize(
|
|
674
|
+
primary.push(( new Action("testing.outputPeek.debugFailed", ( localize(13963, "Debug Failed Tests")), ThemeIcon.asClassName(testingDebugIcon), undefined, () => this.commandService.executeCommand(TestCommandId.DebugFailedFromLastRun, element.results.id))));
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
if (element instanceof TestResultElement) {
|
|
679
679
|
if (element.value.tasks.length === 1) {
|
|
680
|
-
primary.push(( new Action("testing.outputPeek.showResultOutput", ( localize(
|
|
680
|
+
primary.push(( new Action("testing.outputPeek.showResultOutput", ( localize(13958, "Show Result Output")), ThemeIcon.asClassName(Codicon.terminal), undefined, () => this.requestReveal.fire(( new TaskSubject(element.value, 0))))));
|
|
681
681
|
}
|
|
682
|
-
primary.push(( new Action("testing.outputPeek.reRunLastRun", ( localize(
|
|
682
|
+
primary.push(( new Action("testing.outputPeek.reRunLastRun", ( localize(13964, "Rerun Test")), ThemeIcon.asClassName(testingRunIcon), undefined, () => this.commandService.executeCommand("testing.reRunLastRun", element.value.id))));
|
|
683
683
|
const hasFailedTests = ( Iterable.some(element.value.tests, test => isFailedState(test.ownComputedState)));
|
|
684
684
|
if (hasFailedTests) {
|
|
685
|
-
primary.push(( new Action("testing.outputPeek.rerunFailedResult", ( localize(
|
|
685
|
+
primary.push(( new Action("testing.outputPeek.rerunFailedResult", ( localize(13961, "Rerun Failed Tests")), ThemeIcon.asClassName(testingRerunIcon), undefined, () => this.commandService.executeCommand(TestCommandId.ReRunFailedFromLastRun, element.value.id))));
|
|
686
686
|
}
|
|
687
687
|
if (capabilities & TestRunProfileBitset.Debug) {
|
|
688
|
-
primary.push(( new Action("testing.outputPeek.debugLastRun", ( localize(
|
|
688
|
+
primary.push(( new Action("testing.outputPeek.debugLastRun", ( localize(13965, "Debug Test")), ThemeIcon.asClassName(testingDebugIcon), undefined, () => this.commandService.executeCommand("testing.debugLastRun", element.value.id))));
|
|
689
689
|
if (hasFailedTests) {
|
|
690
|
-
primary.push(( new Action("testing.outputPeek.debugFailedResult", ( localize(
|
|
690
|
+
primary.push(( new Action("testing.outputPeek.debugFailedResult", ( localize(13963, "Debug Failed Tests")), ThemeIcon.asClassName(testingDebugIcon), undefined, () => this.commandService.executeCommand(TestCommandId.DebugFailedFromLastRun, element.value.id))));
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
}
|
|
@@ -701,24 +701,24 @@ let TreeActionsProvider = class TreeActionsProvider {
|
|
|
701
701
|
uri
|
|
702
702
|
} = element.test.item;
|
|
703
703
|
if (uri) {
|
|
704
|
-
primary.push(( new Action("testing.outputPeek.goToTest", ( localize(
|
|
704
|
+
primary.push(( new Action("testing.outputPeek.goToTest", ( localize(13966, "Go to Test")), ThemeIcon.asClassName(Codicon.goToFile), undefined, () => this.commandService.executeCommand("vscode.revealTest", extId))));
|
|
705
705
|
}
|
|
706
706
|
if (( element.test.tasks[element.taskIndex].messages.some(m => m.type === TestMessageType.Output))) {
|
|
707
|
-
primary.push(( new Action("testing.outputPeek.showResultOutput", ( localize(
|
|
707
|
+
primary.push(( new Action("testing.outputPeek.showResultOutput", ( localize(13958, "Show Result Output")), ThemeIcon.asClassName(Codicon.terminal), undefined, () => this.requestReveal.fire(element.outputSubject))));
|
|
708
708
|
}
|
|
709
|
-
secondary.push(( new Action("testing.outputPeek.revealInExplorer", ( localize(
|
|
709
|
+
secondary.push(( new Action("testing.outputPeek.revealInExplorer", ( localize(13967, "Reveal in Test Explorer")), ThemeIcon.asClassName(Codicon.listTree), undefined, () => this.commandService.executeCommand("_revealTestInExplorer", extId))));
|
|
710
710
|
if (capabilities & TestRunProfileBitset.Run) {
|
|
711
|
-
primary.push(( new Action("testing.outputPeek.runTest", ( localize(
|
|
711
|
+
primary.push(( new Action("testing.outputPeek.runTest", ( localize(13968, "Run Test")), ThemeIcon.asClassName(testingRunIcon), undefined, () => this.commandService.executeCommand("vscode.runTestsById", TestRunProfileBitset.Run, extId))));
|
|
712
712
|
}
|
|
713
713
|
if (capabilities & TestRunProfileBitset.Debug) {
|
|
714
|
-
primary.push(( new Action("testing.outputPeek.debugTest", ( localize(
|
|
714
|
+
primary.push(( new Action("testing.outputPeek.debugTest", ( localize(13969, "Debug Test")), ThemeIcon.asClassName(testingDebugIcon), undefined, () => this.commandService.executeCommand("vscode.runTestsById", TestRunProfileBitset.Debug, extId))));
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
if (element instanceof TestMessageElement) {
|
|
718
718
|
id = MenuId.TestMessageContext;
|
|
719
719
|
contextKeys.push([TestingContextKeys.testMessageContext.key, element.contextValue]);
|
|
720
720
|
if (this.showRevealLocationOnMessages && element.location) {
|
|
721
|
-
primary.push(( new Action("testing.outputPeek.goToError", ( localize(
|
|
721
|
+
primary.push(( new Action("testing.outputPeek.goToError", ( localize(13970, "Go to Error")), ThemeIcon.asClassName(Codicon.debugStackframe), undefined, () => this.editorService.openEditor({
|
|
722
722
|
resource: element.location.uri,
|
|
723
723
|
options: {
|
|
724
724
|
selection: element.location.range,
|
package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.js
CHANGED
|
@@ -119,7 +119,7 @@ registerAction2(class extends Action2 {
|
|
|
119
119
|
constructor() {
|
|
120
120
|
super({
|
|
121
121
|
id: "testing.callStack.run",
|
|
122
|
-
title: ( localize(
|
|
122
|
+
title: ( localize(13971, "Rerun Test")),
|
|
123
123
|
icon: testingRunIcon,
|
|
124
124
|
menu: {
|
|
125
125
|
id: MenuId.TestCallStack,
|
|
@@ -136,7 +136,7 @@ registerAction2(class extends Action2 {
|
|
|
136
136
|
constructor() {
|
|
137
137
|
super({
|
|
138
138
|
id: "testing.callStack.debug",
|
|
139
|
-
title: ( localize(
|
|
139
|
+
title: ( localize(13972, "Debug Test")),
|
|
140
140
|
icon: testingDebugIcon,
|
|
141
141
|
menu: {
|
|
142
142
|
id: MenuId.TestCallStack,
|
|
@@ -472,7 +472,7 @@ let FollowupActionWidget = class FollowupActionWidget extends Disposable {
|
|
|
472
472
|
followups[picked[0].index].execute();
|
|
473
473
|
}
|
|
474
474
|
}));
|
|
475
|
-
link.innerText = ( localize(
|
|
475
|
+
link.innerText = ( localize(13973, "+{0} More...", followups.length - 1));
|
|
476
476
|
return link;
|
|
477
477
|
}
|
|
478
478
|
makeLink(onClick) {
|
|
@@ -51,21 +51,21 @@ import { TestingViewPaneContainer } from './testingViewPaneContainer.js';
|
|
|
51
51
|
|
|
52
52
|
const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
53
53
|
id: Testing.ViewletId,
|
|
54
|
-
title: ( localize2(
|
|
54
|
+
title: ( localize2(13974, "Testing")),
|
|
55
55
|
ctorDescriptor: ( new SyncDescriptor(TestingViewPaneContainer)),
|
|
56
56
|
icon: testingViewIcon,
|
|
57
57
|
alwaysUseContainerInfo: true,
|
|
58
58
|
order: 6,
|
|
59
59
|
openCommandActionDescriptor: {
|
|
60
60
|
id: Testing.ViewletId,
|
|
61
|
-
mnemonicTitle: ( localize(
|
|
61
|
+
mnemonicTitle: ( localize(13975, "T&&esting")),
|
|
62
62
|
order: 4
|
|
63
63
|
},
|
|
64
64
|
hideIfEmpty: true
|
|
65
65
|
}, ViewContainerLocation.Sidebar);
|
|
66
66
|
const testResultsViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
67
67
|
id: Testing.ResultsPanelId,
|
|
68
|
-
title: ( localize2(
|
|
68
|
+
title: ( localize2(13976, "Test Results")),
|
|
69
69
|
icon: testingResultsIcon,
|
|
70
70
|
ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [Testing.ResultsPanelId, {
|
|
71
71
|
mergeViewWithContainerWhenSingleView: true
|
|
@@ -78,7 +78,7 @@ const testResultsViewContainer = ( Registry.as(Extensions.ViewContainersRegistry
|
|
|
78
78
|
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
79
79
|
viewsRegistry.registerViews([{
|
|
80
80
|
id: Testing.ResultsViewId,
|
|
81
|
-
name: ( localize2(
|
|
81
|
+
name: ( localize2(13976, "Test Results")),
|
|
82
82
|
containerIcon: testingResultsIcon,
|
|
83
83
|
canToggleVisibility: false,
|
|
84
84
|
canMoveView: true,
|
|
@@ -86,15 +86,15 @@ viewsRegistry.registerViews([{
|
|
|
86
86
|
ctorDescriptor: ( new SyncDescriptor(TestResultsView))
|
|
87
87
|
}], testResultsViewContainer);
|
|
88
88
|
viewsRegistry.registerViewWelcomeContent(Testing.ExplorerViewId, {
|
|
89
|
-
content: ( localize(
|
|
89
|
+
content: ( localize(13977, "No tests have been found in this workspace yet."))
|
|
90
90
|
});
|
|
91
91
|
viewsRegistry.registerViewWelcomeContent(Testing.ExplorerViewId, {
|
|
92
|
-
content: "[" + ( localize(
|
|
92
|
+
content: "[" + ( localize(13978, "Install Additional Test Extensions...")) + `](command:${TestCommandId.SearchForTestExtension})`,
|
|
93
93
|
order: 10
|
|
94
94
|
});
|
|
95
95
|
viewsRegistry.registerViews([{
|
|
96
96
|
id: Testing.ExplorerViewId,
|
|
97
|
-
name: ( localize2(
|
|
97
|
+
name: ( localize2(13979, "Test Explorer")),
|
|
98
98
|
ctorDescriptor: ( new SyncDescriptor(TestingExplorerView)),
|
|
99
99
|
canToggleVisibility: true,
|
|
100
100
|
canMoveView: true,
|
|
@@ -104,7 +104,7 @@ viewsRegistry.registerViews([{
|
|
|
104
104
|
when: ContextKeyExpr.greater(TestingContextKeys.providerCount.key, 0)
|
|
105
105
|
}, {
|
|
106
106
|
id: Testing.CoverageViewId,
|
|
107
|
-
name: ( localize2(
|
|
107
|
+
name: ( localize2(13980, "Test Coverage")),
|
|
108
108
|
ctorDescriptor: ( new SyncDescriptor(TestCoverageView)),
|
|
109
109
|
canToggleVisibility: true,
|
|
110
110
|
canMoveView: true,
|
|
@@ -18,7 +18,7 @@ function buildPicker(
|
|
|
18
18
|
showConfigureButtons = true,
|
|
19
19
|
onlyForTest,
|
|
20
20
|
onlyConfigurable,
|
|
21
|
-
placeholder = ( localize(
|
|
21
|
+
placeholder = ( localize(13981, "Pick a test profile to use"))
|
|
22
22
|
}
|
|
23
23
|
) {
|
|
24
24
|
const profileService = accessor.get(ITestProfileService);
|
|
@@ -51,7 +51,7 @@ function buildPicker(
|
|
|
51
51
|
alwaysShow: true,
|
|
52
52
|
buttons: profile.hasConfigurationHandler && showConfigureButtons ? [{
|
|
53
53
|
iconClass: ThemeIcon.asClassName(testingUpdateProfiles),
|
|
54
|
-
tooltip: ( localize(
|
|
54
|
+
tooltip: ( localize(13982, "Update Test Configuration"))
|
|
55
55
|
}] : []
|
|
56
56
|
}));
|
|
57
57
|
}
|
|
@@ -120,7 +120,7 @@ let TestingDecorationService = class TestingDecorationService extends Disposable
|
|
|
120
120
|
this.instantiationService = instantiationService;
|
|
121
121
|
this.modelService = modelService;
|
|
122
122
|
this.generation = 0;
|
|
123
|
-
this.changeEmitter = ( new Emitter());
|
|
123
|
+
this.changeEmitter = this._register(( new Emitter()));
|
|
124
124
|
this.decorationCache = ( new ResourceMap());
|
|
125
125
|
this.invalidatedMessages = ( new WeakSet());
|
|
126
126
|
this.onDidChange = this.changeEmitter.event;
|
|
@@ -669,7 +669,7 @@ const createRunTestDecoration = (tests, states, visible, defaultGutterAction) =>
|
|
|
669
669
|
const building = hoverMessage = ( new MarkdownString("", true)).appendText(hoverMessageParts.join(", ") + ".");
|
|
670
670
|
if (testIdWithMessages) {
|
|
671
671
|
const args = encodeURIComponent(JSON.stringify([testIdWithMessages]));
|
|
672
|
-
building.appendMarkdown(` [${( localize(
|
|
672
|
+
building.appendMarkdown(` [${( localize(13983, "Peek Test Output"))}](command:vscode.peekTestError?${args})`);
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
return hoverMessage;
|
|
@@ -771,7 +771,7 @@ class ExpectedLensContentWidget extends TitleLensContentWidget {
|
|
|
771
771
|
return "expectedTestingLens";
|
|
772
772
|
}
|
|
773
773
|
getText() {
|
|
774
|
-
return localize(
|
|
774
|
+
return localize(13984, "Expected");
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
class ActualLensContentWidget extends TitleLensContentWidget {
|
|
@@ -779,7 +779,7 @@ class ActualLensContentWidget extends TitleLensContentWidget {
|
|
|
779
779
|
return "actualTestingLens";
|
|
780
780
|
}
|
|
781
781
|
getText() {
|
|
782
|
-
return localize(
|
|
782
|
+
return localize(13985, "Actual");
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
let RunTestDecoration = class RunTestDecoration {
|
|
@@ -880,14 +880,14 @@ let RunTestDecoration = class RunTestDecoration {
|
|
|
880
880
|
getGutterLabel() {
|
|
881
881
|
switch (getTestingConfiguration(this.configurationService, TestingConfigKeys.DefaultGutterClickAction)) {
|
|
882
882
|
case DefaultGutterClickAction.ContextMenu:
|
|
883
|
-
return localize(
|
|
883
|
+
return localize(13986, "Click for test options");
|
|
884
884
|
case DefaultGutterClickAction.Debug:
|
|
885
|
-
return localize(
|
|
885
|
+
return localize(13987, "Click to debug tests, right click for more options");
|
|
886
886
|
case DefaultGutterClickAction.Coverage:
|
|
887
|
-
return localize(
|
|
887
|
+
return localize(13988, "Click to run tests with coverage, right click for more options");
|
|
888
888
|
case DefaultGutterClickAction.Run:
|
|
889
889
|
default:
|
|
890
|
-
return localize(
|
|
890
|
+
return localize(13989, "Click to run tests, right click for more options");
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
getTestContextMenuActions(test, resultItem) {
|
|
@@ -895,13 +895,13 @@ let RunTestDecoration = class RunTestDecoration {
|
|
|
895
895
|
const capabilities = this.testProfileService.capabilitiesForTest(test.item);
|
|
896
896
|
[{
|
|
897
897
|
bitset: TestRunProfileBitset.Run,
|
|
898
|
-
label: ( localize(
|
|
898
|
+
label: ( localize(13990, "Run Test"))
|
|
899
899
|
}, {
|
|
900
900
|
bitset: TestRunProfileBitset.Debug,
|
|
901
|
-
label: ( localize(
|
|
901
|
+
label: ( localize(13991, "Debug Test"))
|
|
902
902
|
}, {
|
|
903
903
|
bitset: TestRunProfileBitset.Coverage,
|
|
904
|
-
label: ( localize(
|
|
904
|
+
label: ( localize(13992, "Run with Coverage"))
|
|
905
905
|
}].forEach((
|
|
906
906
|
{
|
|
907
907
|
bitset,
|
|
@@ -922,7 +922,7 @@ let RunTestDecoration = class RunTestDecoration {
|
|
|
922
922
|
}
|
|
923
923
|
});
|
|
924
924
|
if (capabilities & TestRunProfileBitset.HasNonDefaultProfile) {
|
|
925
|
-
testActions.push(( new Action("testing.runUsing", ( localize(
|
|
925
|
+
testActions.push(( new Action("testing.runUsing", ( localize(13993, "Execute Using Profile...")), undefined, undefined, async () => {
|
|
926
926
|
const profile = await this.commandService.executeCommand("vscode.pickTestProfile", {
|
|
927
927
|
onlyForTest: test
|
|
928
928
|
});
|
|
@@ -940,12 +940,12 @@ let RunTestDecoration = class RunTestDecoration {
|
|
|
940
940
|
})));
|
|
941
941
|
}
|
|
942
942
|
if (resultItem && isFailedState(resultItem.computedState)) {
|
|
943
|
-
testActions.push(( new Action("testing.gutter.peekFailure", ( localize(
|
|
943
|
+
testActions.push(( new Action("testing.gutter.peekFailure", ( localize(13994, "Peek Error")), undefined, undefined, () => this.commandService.executeCommand("vscode.peekTestError", test.item.extId))));
|
|
944
944
|
}
|
|
945
945
|
if (resultItem?.computedState === TestResultState.Running) {
|
|
946
|
-
testActions.push(( new Action("testing.gutter.cancel", ( localize(
|
|
946
|
+
testActions.push(( new Action("testing.gutter.cancel", ( localize(13995, "Cancel Test Run")), undefined, undefined, () => this.commandService.executeCommand(TestCommandId.CancelTestRunAction))));
|
|
947
947
|
}
|
|
948
|
-
testActions.push(( new Action("testing.gutter.reveal", ( localize(
|
|
948
|
+
testActions.push(( new Action("testing.gutter.reveal", ( localize(13996, "Reveal in Test Explorer")), undefined, undefined, () => this.commandService.executeCommand("_revealTestInExplorer", test.item.extId))));
|
|
949
949
|
const contributed = this.getContributedTestActions(test, capabilities);
|
|
950
950
|
return {
|
|
951
951
|
object: Separator.join(testActions, contributed),
|
|
@@ -1000,13 +1000,13 @@ let MultiRunTestDecoration = class MultiRunTestDecoration extends RunTestDecorat
|
|
|
1000
1000
|
const allActions = [];
|
|
1001
1001
|
[{
|
|
1002
1002
|
bitset: TestRunProfileBitset.Run,
|
|
1003
|
-
label: ( localize(
|
|
1003
|
+
label: ( localize(13997, "Run All Tests"))
|
|
1004
1004
|
}, {
|
|
1005
1005
|
bitset: TestRunProfileBitset.Coverage,
|
|
1006
|
-
label: ( localize(
|
|
1006
|
+
label: ( localize(13998, "Run All Tests with Coverage"))
|
|
1007
1007
|
}, {
|
|
1008
1008
|
bitset: TestRunProfileBitset.Debug,
|
|
1009
|
-
label: ( localize(
|
|
1009
|
+
label: ( localize(13999, "Debug All Tests"))
|
|
1010
1010
|
}].forEach((
|
|
1011
1011
|
{
|
|
1012
1012
|
bitset,
|
|
@@ -1077,7 +1077,7 @@ let MultiRunTestDecoration = class MultiRunTestDecoration extends RunTestDecorat
|
|
|
1077
1077
|
const overflow = testSubmenus.length - MAX_TESTS_IN_SUBMENU;
|
|
1078
1078
|
if (overflow > 0) {
|
|
1079
1079
|
testSubmenus = testSubmenus.slice(0, MAX_TESTS_IN_SUBMENU);
|
|
1080
|
-
testSubmenus.push(( new Action("testing.gutter.overflow", ( localize(
|
|
1080
|
+
testSubmenus.push(( new Action("testing.gutter.overflow", ( localize(14000, "{0} more tests...", overflow)), undefined, undefined, () => this.pickAndRun(testItems))));
|
|
1081
1081
|
}
|
|
1082
1082
|
return {
|
|
1083
1083
|
object: Separator.join(allActions, testSubmenus),
|
|
@@ -1109,7 +1109,7 @@ let MultiRunTestDecoration = class MultiRunTestDecoration extends RunTestDecorat
|
|
|
1109
1109
|
label: currentLabel,
|
|
1110
1110
|
test: testItem.test,
|
|
1111
1111
|
result: testItem.resultItem
|
|
1112
|
-
}))), ( localize(
|
|
1112
|
+
}))), ( localize(14001, "Select a test to run")));
|
|
1113
1113
|
if (!item) {
|
|
1114
1114
|
return;
|
|
1115
1115
|
}
|
|
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { $, Dimension } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
5
5
|
import { BaseActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
6
|
-
import
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/contextview/contextview';
|
|
7
7
|
import { DropdownMenuActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/dropdown/dropdownActionViewItem';
|
|
8
8
|
import { Action, Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
9
9
|
import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
@@ -21,13 +21,14 @@ import { TestFilterTerm } from '../common/testExplorerFilterState.js';
|
|
|
21
21
|
import { ITestExplorerFilterState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testExplorerFilterState.service';
|
|
22
22
|
import { ITestService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testService.service';
|
|
23
23
|
import { denamespaceTestTag } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testTypes';
|
|
24
|
+
import { AnchorAlignment } from '@codingame/monaco-vscode-api/vscode/vs/base/common/layout';
|
|
24
25
|
|
|
25
26
|
const testFilterDescriptions = {
|
|
26
|
-
[TestFilterTerm.Failed]: ( localize(
|
|
27
|
-
[TestFilterTerm.Executed]: ( localize(
|
|
28
|
-
[TestFilterTerm.CurrentDoc]: ( localize(
|
|
29
|
-
[TestFilterTerm.OpenedFiles]: ( localize(
|
|
30
|
-
[TestFilterTerm.Hidden]: ( localize(
|
|
27
|
+
[TestFilterTerm.Failed]: ( localize(14002, "Show Only Failed Tests")),
|
|
28
|
+
[TestFilterTerm.Executed]: ( localize(14003, "Show Only Executed Tests")),
|
|
29
|
+
[TestFilterTerm.CurrentDoc]: ( localize(14004, "Show in Active File Only")),
|
|
30
|
+
[TestFilterTerm.OpenedFiles]: ( localize(14005, "Show in Opened Files Only")),
|
|
31
|
+
[TestFilterTerm.Hidden]: ( localize(14006, "Show Hidden Tests"))
|
|
31
32
|
};
|
|
32
33
|
let TestingExplorerFilter = class TestingExplorerFilter extends BaseActionViewItem {
|
|
33
34
|
constructor(action, options, state, instantiationService, testService) {
|
|
@@ -37,7 +38,7 @@ let TestingExplorerFilter = class TestingExplorerFilter extends BaseActionViewIt
|
|
|
37
38
|
this.testService = testService;
|
|
38
39
|
this.focusEmitter = this._register(( new Emitter()));
|
|
39
40
|
this.onDidFocus = this.focusEmitter.event;
|
|
40
|
-
this.filtersAction = ( new Action("markersFiltersAction", ( localize(
|
|
41
|
+
this.filtersAction = ( new Action("markersFiltersAction", ( localize(14007, "More Filters...")), "testing-filter-button " + ThemeIcon.asClassName(testingFilterIcon)));
|
|
41
42
|
this.history = this._register(instantiationService.createInstance(StoredValue, {
|
|
42
43
|
key: "testing.filterHistory2",
|
|
43
44
|
scope: StorageScope.WORKSPACE,
|
|
@@ -69,7 +70,7 @@ let TestingExplorerFilter = class TestingExplorerFilter extends BaseActionViewIt
|
|
|
69
70
|
const input = this.input = this._register(
|
|
70
71
|
this.instantiationService.createInstance(ContextScopedSuggestEnabledInputWithHistory, {
|
|
71
72
|
id: "testing.explorer.filter",
|
|
72
|
-
ariaLabel: ( localize(
|
|
73
|
+
ariaLabel: ( localize(14008, "Filter text for tests in the explorer")),
|
|
73
74
|
parent: wrapper,
|
|
74
75
|
suggestionProvider: {
|
|
75
76
|
triggerCharacters: ["@"],
|
|
@@ -92,7 +93,7 @@ let TestingExplorerFilter = class TestingExplorerFilter extends BaseActionViewIt
|
|
|
92
93
|
resourceHandle: "testing:filter",
|
|
93
94
|
suggestOptions: {
|
|
94
95
|
value: this.state.text.value,
|
|
95
|
-
placeholderText: ( localize(
|
|
96
|
+
placeholderText: ( localize(14009, "Filter (e.g. text, !exclude, @tag)"))
|
|
96
97
|
},
|
|
97
98
|
history: history.values
|
|
98
99
|
})
|
|
@@ -193,7 +194,7 @@ let FiltersDropdownMenuActionViewItem = class FiltersDropdownMenuActionViewItem
|
|
|
193
194
|
class: undefined,
|
|
194
195
|
enabled: true,
|
|
195
196
|
id: "fuzzy",
|
|
196
|
-
label: ( localize(
|
|
197
|
+
label: ( localize(14010, "Fuzzy Match")),
|
|
197
198
|
run: () => this.filters.fuzzy.value = !this.filters.fuzzy.value,
|
|
198
199
|
tooltip: ""
|
|
199
200
|
}, ( new Separator()), {
|
|
@@ -201,14 +202,14 @@ let FiltersDropdownMenuActionViewItem = class FiltersDropdownMenuActionViewItem
|
|
|
201
202
|
class: undefined,
|
|
202
203
|
enabled: this.testService.excluded.hasAny,
|
|
203
204
|
id: "showExcluded",
|
|
204
|
-
label: ( localize(
|
|
205
|
+
label: ( localize(14006, "Show Hidden Tests")),
|
|
205
206
|
run: () => this.filters.toggleFilteringFor(TestFilterTerm.Hidden),
|
|
206
207
|
tooltip: ""
|
|
207
208
|
}, {
|
|
208
209
|
class: undefined,
|
|
209
210
|
enabled: this.testService.excluded.hasAny,
|
|
210
211
|
id: "removeExcluded",
|
|
211
|
-
label: ( localize(
|
|
212
|
+
label: ( localize(14011, "Unhide All Tests")),
|
|
212
213
|
run: async () => this.testService.excluded.clear(),
|
|
213
214
|
tooltip: ""
|
|
214
215
|
}];
|
|
@@ -59,7 +59,7 @@ import { registerNavigableContainer } from '@codingame/monaco-vscode-api/vscode/
|
|
|
59
59
|
import { ViewPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
60
60
|
import { DiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/diffEditorInput';
|
|
61
61
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
62
|
-
import {
|
|
62
|
+
import { IconBadge, NumberBadge } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity';
|
|
63
63
|
import { IActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service';
|
|
64
64
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
65
65
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -328,7 +328,7 @@ let TestingExplorerView = class TestingExplorerView extends ViewPane {
|
|
|
328
328
|
participatingProfiles++;
|
|
329
329
|
profileActions.push(toAction({
|
|
330
330
|
id: `${controller.id}.${profile.profileId}`,
|
|
331
|
-
label: defaults.includes(profile) ? ( localize(
|
|
331
|
+
label: defaults.includes(profile) ? ( localize(14012, "{0} (Default)", profile.label)) : profile.label,
|
|
332
332
|
run: () => {
|
|
333
333
|
const {
|
|
334
334
|
include,
|
|
@@ -364,14 +364,14 @@ let TestingExplorerView = class TestingExplorerView extends ViewPane {
|
|
|
364
364
|
if (participatingProfiles > 1) {
|
|
365
365
|
postActions.push(toAction({
|
|
366
366
|
id: "selectDefaultTestConfigurations",
|
|
367
|
-
label: ( localize(
|
|
367
|
+
label: ( localize(14013, "Select Default Profile")),
|
|
368
368
|
run: () => this.commandService.executeCommand(TestCommandId.SelectDefaultTestProfiles, group)
|
|
369
369
|
}));
|
|
370
370
|
}
|
|
371
371
|
if (hasConfigurable) {
|
|
372
372
|
postActions.push(toAction({
|
|
373
373
|
id: "configureTestProfiles",
|
|
374
|
-
label: ( localize(
|
|
374
|
+
label: ( localize(14014, "Configure Test Profiles")),
|
|
375
375
|
run: () => this.commandService.executeCommand(TestCommandId.ConfigureTestProfilesAction, group)
|
|
376
376
|
}));
|
|
377
377
|
}
|
|
@@ -406,7 +406,7 @@ let TestingExplorerView = class TestingExplorerView extends ViewPane {
|
|
|
406
406
|
getDropdownAction() {
|
|
407
407
|
return (new Action(
|
|
408
408
|
"selectRunConfig",
|
|
409
|
-
localize(
|
|
409
|
+
localize(14015, "Select Configuration..."),
|
|
410
410
|
"codicon-chevron-down",
|
|
411
411
|
true
|
|
412
412
|
));
|
|
@@ -569,7 +569,7 @@ let ResultSummaryView = class ResultSummaryView extends Disposable {
|
|
|
569
569
|
root.remove();
|
|
570
570
|
this.elementsWereAttached = false;
|
|
571
571
|
}
|
|
572
|
-
this.container.innerText = ( localize(
|
|
572
|
+
this.container.innerText = ( localize(14016, "No test results yet."));
|
|
573
573
|
this.badgeDisposable.clear();
|
|
574
574
|
return;
|
|
575
575
|
}
|
|
@@ -592,16 +592,21 @@ let ResultSummaryView = class ResultSummaryView extends Disposable {
|
|
|
592
592
|
}
|
|
593
593
|
count.textContent = `${counts.passed}/${counts.totalWillBeRun}`;
|
|
594
594
|
this.countHover.update(getTestProgressText(counts));
|
|
595
|
-
this.renderActivityBadge(counts);
|
|
595
|
+
this.renderActivityBadge(counts, live.length > 0);
|
|
596
596
|
if (!this.elementsWereAttached) {
|
|
597
597
|
clearNode(this.container);
|
|
598
598
|
this.container.appendChild(root);
|
|
599
599
|
this.elementsWereAttached = true;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
renderActivityBadge(countSummary) {
|
|
603
|
-
if (
|
|
604
|
-
if (this.lastBadge instanceof
|
|
602
|
+
renderActivityBadge(countSummary, isRunning) {
|
|
603
|
+
if (isRunning) {
|
|
604
|
+
if (this.badgeDisposable.value && this.lastBadge instanceof IconBadge && this.lastBadge.icon === spinningLoading) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
this.lastBadge = ( new IconBadge(spinningLoading, () => ( localize(14017, "Tests are running"))));
|
|
608
|
+
} else if (countSummary && this.badgeType !== TestingCountBadge.Off && countSummary[this.badgeType] !== 0) {
|
|
609
|
+
if (this.badgeDisposable.value && this.lastBadge instanceof NumberBadge && this.lastBadge.number === countSummary[this.badgeType]) {
|
|
605
610
|
return;
|
|
606
611
|
}
|
|
607
612
|
this.lastBadge = ( new NumberBadge(
|
|
@@ -609,10 +614,10 @@ let ResultSummaryView = class ResultSummaryView extends Disposable {
|
|
|
609
614
|
num => this.getLocalizedBadgeString(this.badgeType, num)
|
|
610
615
|
));
|
|
611
616
|
} else if (this.crService.isEnabled()) {
|
|
612
|
-
if (this.lastBadge instanceof IconBadge && this.lastBadge.icon === testingContinuousIsOn) {
|
|
617
|
+
if (this.badgeDisposable.value && this.lastBadge instanceof IconBadge && this.lastBadge.icon === testingContinuousIsOn) {
|
|
613
618
|
return;
|
|
614
619
|
}
|
|
615
|
-
this.lastBadge = ( new IconBadge(testingContinuousIsOn, () => ( localize(
|
|
620
|
+
this.lastBadge = ( new IconBadge(testingContinuousIsOn, () => ( localize(14018, "Tests are being watched for changes"))));
|
|
616
621
|
} else {
|
|
617
622
|
if (!this.lastBadge) {
|
|
618
623
|
return;
|
|
@@ -626,11 +631,11 @@ let ResultSummaryView = class ResultSummaryView extends Disposable {
|
|
|
626
631
|
getLocalizedBadgeString(countBadgeType, count) {
|
|
627
632
|
switch (countBadgeType) {
|
|
628
633
|
case TestingCountBadge.Passed:
|
|
629
|
-
return localize(
|
|
634
|
+
return localize(14019, "{0} passed tests", count);
|
|
630
635
|
case TestingCountBadge.Skipped:
|
|
631
|
-
return localize(
|
|
636
|
+
return localize(14020, "{0} skipped tests", count);
|
|
632
637
|
default:
|
|
633
|
-
return localize(
|
|
638
|
+
return localize(14021, "{0} failed tests", count);
|
|
634
639
|
}
|
|
635
640
|
}
|
|
636
641
|
};
|
|
@@ -701,8 +706,8 @@ let TestingExplorerViewModel = class TestingExplorerViewModel extends Disposable
|
|
|
701
706
|
this.testProfileService = testProfileService;
|
|
702
707
|
this.crService = crService;
|
|
703
708
|
this.projection = this._register(( new MutableDisposable()));
|
|
704
|
-
this.revealTimeout = ( new MutableDisposable());
|
|
705
|
-
this.welcomeVisibilityEmitter = ( new Emitter());
|
|
709
|
+
this.revealTimeout = this._register(( new MutableDisposable()));
|
|
710
|
+
this.welcomeVisibilityEmitter = this._register(( new Emitter()));
|
|
706
711
|
this.actionRunner = this._register(( new TestExplorerActionRunner(() => this.tree.getSelection().filter(isDefined))));
|
|
707
712
|
this.hasPendingReveal = false;
|
|
708
713
|
this.onChangeWelcomeVisibility = this.welcomeVisibilityEmitter.event;
|
|
@@ -1169,8 +1174,8 @@ let NoTestsForDocumentWidget = class NoTestsForDocumentWidget extends Disposable
|
|
|
1169
1174
|
super();
|
|
1170
1175
|
const el = this.el = append(container, $(".testing-no-test-placeholder"));
|
|
1171
1176
|
const emptyParagraph = append(el, $("p"));
|
|
1172
|
-
emptyParagraph.innerText = ( localize(
|
|
1173
|
-
const buttonLabel = ( localize(
|
|
1177
|
+
emptyParagraph.innerText = ( localize(14022, "No tests were found in this file."));
|
|
1178
|
+
const buttonLabel = ( localize(14023, "Show Workspace Tests"));
|
|
1174
1179
|
const button = this._register(( new Button(el, {
|
|
1175
1180
|
title: buttonLabel,
|
|
1176
1181
|
...defaultButtonStyles
|
|
@@ -1205,17 +1210,17 @@ const getLabelForTestTreeElement = element => {
|
|
|
1205
1210
|
let label = labelForTestInState(element.description || element.test.item.label, element.state);
|
|
1206
1211
|
if (element instanceof TestItemTreeElement) {
|
|
1207
1212
|
if (element.duration !== undefined) {
|
|
1208
|
-
label = ( localize(
|
|
1213
|
+
label = ( localize(14024, "{0}, in {1}", label, formatDuration(element.duration)));
|
|
1209
1214
|
}
|
|
1210
1215
|
if (element.retired) {
|
|
1211
|
-
label = ( localize(
|
|
1216
|
+
label = ( localize(14025, "{0}, outdated result", label));
|
|
1212
1217
|
}
|
|
1213
1218
|
}
|
|
1214
1219
|
return label;
|
|
1215
1220
|
};
|
|
1216
1221
|
class ListAccessibilityProvider {
|
|
1217
1222
|
getWidgetAriaLabel() {
|
|
1218
|
-
return localize(
|
|
1223
|
+
return localize(14026, "Test Explorer");
|
|
1219
1224
|
}
|
|
1220
1225
|
getAriaLabel(element) {
|
|
1221
1226
|
return element instanceof TestTreeErrorMessage ? element.description : getLabelForTestTreeElement(element);
|