@codingame/monaco-vscode-testing-service-override 1.83.16
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/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +30 -0
- package/testing.d.ts +5 -0
- package/testing.js +28 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/display.js +3 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/index.js +76 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.js +186 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testItemContextOverlay.js +18 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingObjectTree.js +46 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingViewState.js +17 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.js +220 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/icons.js +149 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/media/testing.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.js +1427 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testing.contribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testingDecorations.js +879 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +237 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +1225 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +1991 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testingProgressUiService.js +142 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.js +47 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/theme.js +130 -0
- package/vscode/src/vs/workbench/contrib/testing/common/configuration.js +213 -0
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +59 -0
- package/vscode/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.js +129 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testExclusions.js +48 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +293 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.js +125 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingUri.js +67 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
4
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
5
|
+
import { IViewsService } from 'vscode/vscode/vs/workbench/common/views';
|
|
6
|
+
import { getTestingConfiguration } from '../common/configuration.js';
|
|
7
|
+
import { isFailedState } from 'vscode/vscode/vs/workbench/contrib/testing/common/testingStates';
|
|
8
|
+
import { ITestResultService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testResultService';
|
|
9
|
+
|
|
10
|
+
let TestingProgressTrigger = class TestingProgressTrigger extends Disposable {
|
|
11
|
+
constructor(resultService, configurationService, viewsService) {
|
|
12
|
+
super();
|
|
13
|
+
this.configurationService = configurationService;
|
|
14
|
+
this.viewsService = viewsService;
|
|
15
|
+
this._register(resultService.onResultsChanged((e) => {
|
|
16
|
+
if ('started' in e) {
|
|
17
|
+
this.attachAutoOpenForNewResults(e.started);
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
attachAutoOpenForNewResults(result) {
|
|
22
|
+
if (result.request.isUiTriggered === false) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const cfg = getTestingConfiguration(this.configurationService, "testing.openTesting" );
|
|
26
|
+
if (cfg === "neverOpen" ) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (cfg === "openExplorerOnTestStart" ) {
|
|
30
|
+
return this.openExplorerView();
|
|
31
|
+
}
|
|
32
|
+
if (cfg === "openOnTestStart" ) {
|
|
33
|
+
return this.openResultsView();
|
|
34
|
+
}
|
|
35
|
+
const disposable = ( new DisposableStore());
|
|
36
|
+
disposable.add(result.onComplete(() => disposable.dispose()));
|
|
37
|
+
disposable.add(result.onChange(e => {
|
|
38
|
+
if (e.reason === 1 && isFailedState(e.item.ownComputedState)) {
|
|
39
|
+
this.openResultsView();
|
|
40
|
+
disposable.dispose();
|
|
41
|
+
}
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
openExplorerView() {
|
|
45
|
+
this.viewsService.openView("workbench.view.testing" , false);
|
|
46
|
+
}
|
|
47
|
+
openResultsView() {
|
|
48
|
+
this.viewsService.openView("workbench.panel.testResults.view" , false);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
TestingProgressTrigger = ( __decorate([
|
|
52
|
+
( __param(0, ITestResultService)),
|
|
53
|
+
( __param(1, IConfigurationService)),
|
|
54
|
+
( __param(2, IViewsService))
|
|
55
|
+
], TestingProgressTrigger));
|
|
56
|
+
const collectTestStateCounts = (isRunning, results) => {
|
|
57
|
+
let passed = 0;
|
|
58
|
+
let failed = 0;
|
|
59
|
+
let skipped = 0;
|
|
60
|
+
let running = 0;
|
|
61
|
+
let queued = 0;
|
|
62
|
+
for (const result of results) {
|
|
63
|
+
const count = result.counts;
|
|
64
|
+
failed += count[6 ] + count[4 ];
|
|
65
|
+
passed += count[3 ];
|
|
66
|
+
skipped += count[5 ];
|
|
67
|
+
running += count[2 ];
|
|
68
|
+
queued += count[1 ];
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
isRunning,
|
|
72
|
+
passed,
|
|
73
|
+
failed,
|
|
74
|
+
runSoFar: passed + failed,
|
|
75
|
+
totalWillBeRun: passed + failed + queued + running,
|
|
76
|
+
skipped,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
const getTestProgressText = ({ isRunning, passed, runSoFar, totalWillBeRun, skipped, failed }) => {
|
|
80
|
+
let percent = passed / runSoFar * 100;
|
|
81
|
+
if (failed > 0) {
|
|
82
|
+
percent = Math.min(percent, 99.9);
|
|
83
|
+
}
|
|
84
|
+
else if (runSoFar === 0) {
|
|
85
|
+
percent = 0;
|
|
86
|
+
}
|
|
87
|
+
if (isRunning) {
|
|
88
|
+
if (runSoFar === 0) {
|
|
89
|
+
return ( localizeWithPath(
|
|
90
|
+
'vs/workbench/contrib/testing/browser/testingProgressUiService',
|
|
91
|
+
'testProgress.runningInitial',
|
|
92
|
+
'Running tests...'
|
|
93
|
+
));
|
|
94
|
+
}
|
|
95
|
+
else if (skipped === 0) {
|
|
96
|
+
return ( localizeWithPath(
|
|
97
|
+
'vs/workbench/contrib/testing/browser/testingProgressUiService',
|
|
98
|
+
'testProgress.running',
|
|
99
|
+
'Running tests, {0}/{1} passed ({2}%)',
|
|
100
|
+
passed,
|
|
101
|
+
totalWillBeRun,
|
|
102
|
+
percent.toPrecision(3)
|
|
103
|
+
));
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
return ( localizeWithPath(
|
|
107
|
+
'vs/workbench/contrib/testing/browser/testingProgressUiService',
|
|
108
|
+
'testProgressWithSkip.running',
|
|
109
|
+
'Running tests, {0}/{1} tests passed ({2}%, {3} skipped)',
|
|
110
|
+
passed,
|
|
111
|
+
totalWillBeRun,
|
|
112
|
+
percent.toPrecision(3),
|
|
113
|
+
skipped
|
|
114
|
+
));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
if (skipped === 0) {
|
|
119
|
+
return ( localizeWithPath(
|
|
120
|
+
'vs/workbench/contrib/testing/browser/testingProgressUiService',
|
|
121
|
+
'testProgress.completed',
|
|
122
|
+
'{0}/{1} tests passed ({2}%)',
|
|
123
|
+
passed,
|
|
124
|
+
runSoFar,
|
|
125
|
+
percent.toPrecision(3)
|
|
126
|
+
));
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return ( localizeWithPath(
|
|
130
|
+
'vs/workbench/contrib/testing/browser/testingProgressUiService',
|
|
131
|
+
'testProgressWithSkip.completed',
|
|
132
|
+
'{0}/{1} tests passed ({2}%, {3} skipped)',
|
|
133
|
+
passed,
|
|
134
|
+
runSoFar,
|
|
135
|
+
percent.toPrecision(3),
|
|
136
|
+
skipped
|
|
137
|
+
));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export { TestingProgressTrigger, collectTestStateCounts, getTestProgressText };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
4
|
+
import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
5
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
6
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
7
|
+
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
8
|
+
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
9
|
+
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
10
|
+
import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
11
|
+
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
12
|
+
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
13
|
+
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
14
|
+
|
|
15
|
+
let TestingViewPaneContainer = class TestingViewPaneContainer extends ViewPaneContainer {
|
|
16
|
+
constructor(layoutService, telemetryService, instantiationService, contextMenuService, themeService, storageService, configurationService, extensionService, contextService, viewDescriptorService) {
|
|
17
|
+
super("workbench.view.extension.test" , { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService);
|
|
18
|
+
}
|
|
19
|
+
create(parent) {
|
|
20
|
+
super.create(parent);
|
|
21
|
+
parent.classList.add('testing-view-pane');
|
|
22
|
+
}
|
|
23
|
+
getOptimalWidth() {
|
|
24
|
+
return 400;
|
|
25
|
+
}
|
|
26
|
+
getTitle() {
|
|
27
|
+
return ( localizeWithPath(
|
|
28
|
+
'vs/workbench/contrib/testing/browser/testingViewPaneContainer',
|
|
29
|
+
'testing',
|
|
30
|
+
"Testing"
|
|
31
|
+
));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
TestingViewPaneContainer = ( __decorate([
|
|
35
|
+
( __param(0, IWorkbenchLayoutService)),
|
|
36
|
+
( __param(1, ITelemetryService)),
|
|
37
|
+
( __param(2, IInstantiationService)),
|
|
38
|
+
( __param(3, IContextMenuService)),
|
|
39
|
+
( __param(4, IThemeService)),
|
|
40
|
+
( __param(5, IStorageService)),
|
|
41
|
+
( __param(6, IConfigurationService)),
|
|
42
|
+
( __param(7, IExtensionService)),
|
|
43
|
+
( __param(8, IWorkspaceContextService)),
|
|
44
|
+
( __param(9, IViewDescriptorService))
|
|
45
|
+
], TestingViewPaneContainer));
|
|
46
|
+
|
|
47
|
+
export { TestingViewPaneContainer };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Color, RGBA } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { registerColor, editorErrorForeground, contrastBorder, transparent, editorForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
|
+
|
|
5
|
+
const testingColorIconFailed = registerColor('testing.iconFailed', {
|
|
6
|
+
dark: '#f14c4c',
|
|
7
|
+
light: '#f14c4c',
|
|
8
|
+
hcDark: '#f14c4c',
|
|
9
|
+
hcLight: '#B5200D'
|
|
10
|
+
}, ( localizeWithPath(
|
|
11
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
12
|
+
'testing.iconFailed',
|
|
13
|
+
"Color for the 'failed' icon in the test explorer."
|
|
14
|
+
)));
|
|
15
|
+
const testingColorIconErrored = registerColor('testing.iconErrored', {
|
|
16
|
+
dark: '#f14c4c',
|
|
17
|
+
light: '#f14c4c',
|
|
18
|
+
hcDark: '#f14c4c',
|
|
19
|
+
hcLight: '#B5200D'
|
|
20
|
+
}, ( localizeWithPath(
|
|
21
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
22
|
+
'testing.iconErrored',
|
|
23
|
+
"Color for the 'Errored' icon in the test explorer."
|
|
24
|
+
)));
|
|
25
|
+
const testingColorIconPassed = registerColor('testing.iconPassed', {
|
|
26
|
+
dark: '#73c991',
|
|
27
|
+
light: '#73c991',
|
|
28
|
+
hcDark: '#73c991',
|
|
29
|
+
hcLight: '#007100'
|
|
30
|
+
}, ( localizeWithPath(
|
|
31
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
32
|
+
'testing.iconPassed',
|
|
33
|
+
"Color for the 'passed' icon in the test explorer."
|
|
34
|
+
)));
|
|
35
|
+
const testingColorRunAction = registerColor('testing.runAction', {
|
|
36
|
+
dark: testingColorIconPassed,
|
|
37
|
+
light: testingColorIconPassed,
|
|
38
|
+
hcDark: testingColorIconPassed,
|
|
39
|
+
hcLight: testingColorIconPassed
|
|
40
|
+
}, ( localizeWithPath(
|
|
41
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
42
|
+
'testing.runAction',
|
|
43
|
+
"Color for 'run' icons in the editor."
|
|
44
|
+
)));
|
|
45
|
+
const testingColorIconQueued = registerColor('testing.iconQueued', {
|
|
46
|
+
dark: '#cca700',
|
|
47
|
+
light: '#cca700',
|
|
48
|
+
hcDark: '#cca700',
|
|
49
|
+
hcLight: '#cca700'
|
|
50
|
+
}, ( localizeWithPath(
|
|
51
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
52
|
+
'testing.iconQueued',
|
|
53
|
+
"Color for the 'Queued' icon in the test explorer."
|
|
54
|
+
)));
|
|
55
|
+
const testingColorIconUnset = registerColor('testing.iconUnset', {
|
|
56
|
+
dark: '#848484',
|
|
57
|
+
light: '#848484',
|
|
58
|
+
hcDark: '#848484',
|
|
59
|
+
hcLight: '#848484'
|
|
60
|
+
}, ( localizeWithPath(
|
|
61
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
62
|
+
'testing.iconUnset',
|
|
63
|
+
"Color for the 'Unset' icon in the test explorer."
|
|
64
|
+
)));
|
|
65
|
+
const testingColorIconSkipped = registerColor('testing.iconSkipped', {
|
|
66
|
+
dark: '#848484',
|
|
67
|
+
light: '#848484',
|
|
68
|
+
hcDark: '#848484',
|
|
69
|
+
hcLight: '#848484'
|
|
70
|
+
}, ( localizeWithPath(
|
|
71
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
72
|
+
'testing.iconSkipped',
|
|
73
|
+
"Color for the 'Skipped' icon in the test explorer."
|
|
74
|
+
)));
|
|
75
|
+
const testingPeekBorder = registerColor('testing.peekBorder', {
|
|
76
|
+
dark: editorErrorForeground,
|
|
77
|
+
light: editorErrorForeground,
|
|
78
|
+
hcDark: contrastBorder,
|
|
79
|
+
hcLight: contrastBorder
|
|
80
|
+
}, ( localizeWithPath(
|
|
81
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
82
|
+
'testing.peekBorder',
|
|
83
|
+
'Color of the peek view borders and arrow.'
|
|
84
|
+
)));
|
|
85
|
+
const testingPeekHeaderBackground = registerColor('testing.peekHeaderBackground', {
|
|
86
|
+
dark: ( transparent(editorErrorForeground, 0.1)),
|
|
87
|
+
light: ( transparent(editorErrorForeground, 0.1)),
|
|
88
|
+
hcDark: null,
|
|
89
|
+
hcLight: null
|
|
90
|
+
}, ( localizeWithPath(
|
|
91
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
92
|
+
'testing.peekBorder',
|
|
93
|
+
'Color of the peek view borders and arrow.'
|
|
94
|
+
)));
|
|
95
|
+
({
|
|
96
|
+
[0 ]: {
|
|
97
|
+
decorationForeground: registerColor('testing.message.error.decorationForeground', { dark: editorErrorForeground, light: editorErrorForeground, hcDark: editorForeground, hcLight: editorForeground }, ( localizeWithPath(
|
|
98
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
99
|
+
'testing.message.error.decorationForeground',
|
|
100
|
+
'Text color of test error messages shown inline in the editor.'
|
|
101
|
+
))),
|
|
102
|
+
marginBackground: registerColor('testing.message.error.lineBackground', { dark: ( new Color(( new RGBA(255, 0, 0, 0.2)))), light: ( new Color(( new RGBA(255, 0, 0, 0.2)))), hcDark: null, hcLight: null }, ( localizeWithPath(
|
|
103
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
104
|
+
'testing.message.error.marginBackground',
|
|
105
|
+
'Margin color beside error messages shown inline in the editor.'
|
|
106
|
+
))),
|
|
107
|
+
},
|
|
108
|
+
[1 ]: {
|
|
109
|
+
decorationForeground: registerColor('testing.message.info.decorationForeground', { dark: ( transparent(editorForeground, 0.5)), light: ( transparent(editorForeground, 0.5)), hcDark: ( transparent(editorForeground, 0.5)), hcLight: ( transparent(editorForeground, 0.5)) }, ( localizeWithPath(
|
|
110
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
111
|
+
'testing.message.info.decorationForeground',
|
|
112
|
+
'Text color of test info messages shown inline in the editor.'
|
|
113
|
+
))),
|
|
114
|
+
marginBackground: registerColor('testing.message.info.lineBackground', { dark: null, light: null, hcDark: null, hcLight: null }, ( localizeWithPath(
|
|
115
|
+
'vs/workbench/contrib/testing/browser/theme',
|
|
116
|
+
'testing.message.info.marginBackground',
|
|
117
|
+
'Margin color beside info messages shown inline in the editor.'
|
|
118
|
+
))),
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
const testStatesToIconColors = {
|
|
122
|
+
[6 ]: testingColorIconErrored,
|
|
123
|
+
[4 ]: testingColorIconFailed,
|
|
124
|
+
[3 ]: testingColorIconPassed,
|
|
125
|
+
[1 ]: testingColorIconQueued,
|
|
126
|
+
[0 ]: testingColorIconUnset,
|
|
127
|
+
[5 ]: testingColorIconSkipped,
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export { testStatesToIconColors, testingColorIconErrored, testingColorIconFailed, testingColorIconPassed, testingColorIconQueued, testingColorIconSkipped, testingColorIconUnset, testingColorRunAction, testingPeekBorder, testingPeekHeaderBackground };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
+
|
|
3
|
+
const testingConfiguration = {
|
|
4
|
+
id: 'testing',
|
|
5
|
+
order: 21,
|
|
6
|
+
title: ( localizeWithPath(
|
|
7
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
8
|
+
'testConfigurationTitle',
|
|
9
|
+
"Testing"
|
|
10
|
+
)),
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
["testing.autoRun.delay" ]: {
|
|
14
|
+
type: 'integer',
|
|
15
|
+
minimum: 0,
|
|
16
|
+
description: ( localizeWithPath(
|
|
17
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
18
|
+
'testing.autoRun.delay',
|
|
19
|
+
"How long to wait, in milliseconds, after a test is marked as outdated and starting a new run."
|
|
20
|
+
)),
|
|
21
|
+
default: 1000,
|
|
22
|
+
},
|
|
23
|
+
["testing.automaticallyOpenPeekView" ]: {
|
|
24
|
+
description: ( localizeWithPath(
|
|
25
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
26
|
+
'testing.automaticallyOpenPeekView',
|
|
27
|
+
"Configures when the error Peek view is automatically opened."
|
|
28
|
+
)),
|
|
29
|
+
enum: [
|
|
30
|
+
"failureAnywhere" ,
|
|
31
|
+
"failureInVisibleDocument" ,
|
|
32
|
+
"never" ,
|
|
33
|
+
],
|
|
34
|
+
default: "failureInVisibleDocument" ,
|
|
35
|
+
enumDescriptions: [
|
|
36
|
+
( localizeWithPath(
|
|
37
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
38
|
+
'testing.automaticallyOpenPeekView.failureAnywhere',
|
|
39
|
+
"Open automatically no matter where the failure is."
|
|
40
|
+
)),
|
|
41
|
+
( localizeWithPath(
|
|
42
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
43
|
+
'testing.automaticallyOpenPeekView.failureInVisibleDocument',
|
|
44
|
+
"Open automatically when a test fails in a visible document."
|
|
45
|
+
)),
|
|
46
|
+
( localizeWithPath(
|
|
47
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
48
|
+
'testing.automaticallyOpenPeekView.never',
|
|
49
|
+
"Never automatically open."
|
|
50
|
+
)),
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
["testing.showAllMessages" ]: {
|
|
54
|
+
description: ( localizeWithPath(
|
|
55
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
56
|
+
'testing.showAllMessages',
|
|
57
|
+
"Controls whether to show messages from all test runs."
|
|
58
|
+
)),
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
62
|
+
["testing.automaticallyOpenPeekViewDuringAutoRun" ]: {
|
|
63
|
+
description: ( localizeWithPath(
|
|
64
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
65
|
+
'testing.automaticallyOpenPeekViewDuringContinuousRun',
|
|
66
|
+
"Controls whether to automatically open the Peek view during continuous run mode."
|
|
67
|
+
)),
|
|
68
|
+
type: 'boolean',
|
|
69
|
+
default: false,
|
|
70
|
+
},
|
|
71
|
+
["testing.countBadge" ]: {
|
|
72
|
+
description: ( localizeWithPath(
|
|
73
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
74
|
+
'testing.countBadge',
|
|
75
|
+
'Controls the count badge on the Testing icon on the Activity Bar.'
|
|
76
|
+
)),
|
|
77
|
+
enum: [
|
|
78
|
+
"failed" ,
|
|
79
|
+
"off" ,
|
|
80
|
+
"passed" ,
|
|
81
|
+
"skipped" ,
|
|
82
|
+
],
|
|
83
|
+
enumDescriptions: [
|
|
84
|
+
( localizeWithPath(
|
|
85
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
86
|
+
'testing.countBadge.failed',
|
|
87
|
+
'Show the number of failed tests'
|
|
88
|
+
)),
|
|
89
|
+
( localizeWithPath(
|
|
90
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
91
|
+
'testing.countBadge.off',
|
|
92
|
+
'Disable the testing count badge'
|
|
93
|
+
)),
|
|
94
|
+
( localizeWithPath(
|
|
95
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
96
|
+
'testing.countBadge.passed',
|
|
97
|
+
'Show the number of passed tests'
|
|
98
|
+
)),
|
|
99
|
+
( localizeWithPath(
|
|
100
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
101
|
+
'testing.countBadge.skipped',
|
|
102
|
+
'Show the number of skipped tests'
|
|
103
|
+
)),
|
|
104
|
+
],
|
|
105
|
+
default: "failed" ,
|
|
106
|
+
},
|
|
107
|
+
["testing.followRunningTest" ]: {
|
|
108
|
+
description: ( localizeWithPath(
|
|
109
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
110
|
+
'testing.followRunningTest',
|
|
111
|
+
'Controls whether the running test should be followed in the Test Explorer view.'
|
|
112
|
+
)),
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
default: true,
|
|
115
|
+
},
|
|
116
|
+
["testing.defaultGutterClickAction" ]: {
|
|
117
|
+
description: ( localizeWithPath(
|
|
118
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
119
|
+
'testing.defaultGutterClickAction',
|
|
120
|
+
'Controls the action to take when left-clicking on a test decoration in the gutter.'
|
|
121
|
+
)),
|
|
122
|
+
enum: [
|
|
123
|
+
"run" ,
|
|
124
|
+
"debug" ,
|
|
125
|
+
"contextMenu" ,
|
|
126
|
+
],
|
|
127
|
+
enumDescriptions: [
|
|
128
|
+
( localizeWithPath(
|
|
129
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
130
|
+
'testing.defaultGutterClickAction.run',
|
|
131
|
+
'Run the test.'
|
|
132
|
+
)),
|
|
133
|
+
( localizeWithPath(
|
|
134
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
135
|
+
'testing.defaultGutterClickAction.debug',
|
|
136
|
+
'Debug the test.'
|
|
137
|
+
)),
|
|
138
|
+
( localizeWithPath(
|
|
139
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
140
|
+
'testing.defaultGutterClickAction.contextMenu',
|
|
141
|
+
'Open the context menu for more options.'
|
|
142
|
+
)),
|
|
143
|
+
],
|
|
144
|
+
default: "run" ,
|
|
145
|
+
},
|
|
146
|
+
["testing.gutterEnabled" ]: {
|
|
147
|
+
description: ( localizeWithPath(
|
|
148
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
149
|
+
'testing.gutterEnabled',
|
|
150
|
+
'Controls whether test decorations are shown in the editor gutter.'
|
|
151
|
+
)),
|
|
152
|
+
type: 'boolean',
|
|
153
|
+
default: true,
|
|
154
|
+
},
|
|
155
|
+
["testing.saveBeforeTest" ]: {
|
|
156
|
+
description: ( localizeWithPath(
|
|
157
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
158
|
+
'testing.saveBeforeTest',
|
|
159
|
+
'Control whether save all dirty editors before running a test.'
|
|
160
|
+
)),
|
|
161
|
+
type: 'boolean',
|
|
162
|
+
default: true,
|
|
163
|
+
},
|
|
164
|
+
["testing.openTesting" ]: {
|
|
165
|
+
enum: [
|
|
166
|
+
"neverOpen" ,
|
|
167
|
+
"openOnTestStart" ,
|
|
168
|
+
"openOnTestFailure" ,
|
|
169
|
+
"openExplorerOnTestStart" ,
|
|
170
|
+
],
|
|
171
|
+
enumDescriptions: [
|
|
172
|
+
( localizeWithPath(
|
|
173
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
174
|
+
'testing.openTesting.neverOpen',
|
|
175
|
+
'Never automatically open the testing views'
|
|
176
|
+
)),
|
|
177
|
+
( localizeWithPath(
|
|
178
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
179
|
+
'testing.openTesting.openOnTestStart',
|
|
180
|
+
'Open the test results view when tests start'
|
|
181
|
+
)),
|
|
182
|
+
( localizeWithPath(
|
|
183
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
184
|
+
'testing.openTesting.openOnTestFailure',
|
|
185
|
+
'Open the test result view on any test failure'
|
|
186
|
+
)),
|
|
187
|
+
( localizeWithPath(
|
|
188
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
189
|
+
'testing.openTesting.openExplorerOnTestStart',
|
|
190
|
+
'Open the test explorer when tests start'
|
|
191
|
+
)),
|
|
192
|
+
],
|
|
193
|
+
default: 'openOnTestStart',
|
|
194
|
+
description: ( localizeWithPath(
|
|
195
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
196
|
+
'testing.openTesting',
|
|
197
|
+
"Controls when the testing view should open."
|
|
198
|
+
))
|
|
199
|
+
},
|
|
200
|
+
["testing.alwaysRevealTestOnStateChange" ]: {
|
|
201
|
+
markdownDescription: ( localizeWithPath(
|
|
202
|
+
'vs/workbench/contrib/testing/common/configuration',
|
|
203
|
+
'testing.alwaysRevealTestOnStateChange',
|
|
204
|
+
"Always reveal the executed test when `#testing.followRunningTest#` is on. If this setting is turned off, only failed tests will be revealed."
|
|
205
|
+
)),
|
|
206
|
+
type: 'boolean',
|
|
207
|
+
default: false,
|
|
208
|
+
},
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
const getTestingConfiguration = (config, key) => config.getValue(key);
|
|
212
|
+
|
|
213
|
+
export { getTestingConfiguration, testingConfiguration };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { stripIcons } from 'monaco-editor/esm/vs/base/common/iconLabels.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
|
|
4
|
+
const testStateNames = {
|
|
5
|
+
[6 ]: ( localizeWithPath(
|
|
6
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
7
|
+
'testState.errored',
|
|
8
|
+
'Errored'
|
|
9
|
+
)),
|
|
10
|
+
[4 ]: ( localizeWithPath(
|
|
11
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
12
|
+
'testState.failed',
|
|
13
|
+
'Failed'
|
|
14
|
+
)),
|
|
15
|
+
[3 ]: ( localizeWithPath(
|
|
16
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
17
|
+
'testState.passed',
|
|
18
|
+
'Passed'
|
|
19
|
+
)),
|
|
20
|
+
[1 ]: ( localizeWithPath(
|
|
21
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
22
|
+
'testState.queued',
|
|
23
|
+
'Queued'
|
|
24
|
+
)),
|
|
25
|
+
[2 ]: ( localizeWithPath(
|
|
26
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
27
|
+
'testState.running',
|
|
28
|
+
'Running'
|
|
29
|
+
)),
|
|
30
|
+
[5 ]: ( localizeWithPath(
|
|
31
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
32
|
+
'testState.skipped',
|
|
33
|
+
'Skipped'
|
|
34
|
+
)),
|
|
35
|
+
[0 ]: ( localizeWithPath(
|
|
36
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
37
|
+
'testState.unset',
|
|
38
|
+
'Not yet run'
|
|
39
|
+
)),
|
|
40
|
+
};
|
|
41
|
+
const labelForTestInState = (label, state) => ( localizeWithPath('vs/workbench/contrib/testing/common/constants', {
|
|
42
|
+
key: 'testing.treeElementLabel',
|
|
43
|
+
comment: ['label then the unit tests state, for example "Addition Tests (Running)"'],
|
|
44
|
+
}, '{0} ({1})', stripIcons(label), testStateNames[state]));
|
|
45
|
+
const testConfigurationGroupNames = {
|
|
46
|
+
[4 ]: ( localizeWithPath(
|
|
47
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
48
|
+
'testGroup.debug',
|
|
49
|
+
'Debug'
|
|
50
|
+
)),
|
|
51
|
+
[2 ]: ( localizeWithPath('vs/workbench/contrib/testing/common/constants', 'testGroup.run', 'Run')),
|
|
52
|
+
[8 ]: ( localizeWithPath(
|
|
53
|
+
'vs/workbench/contrib/testing/common/constants',
|
|
54
|
+
'testGroup.coverage',
|
|
55
|
+
'Coverage'
|
|
56
|
+
)),
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export { labelForTestInState, testConfigurationGroupNames };
|