@theia/test 1.67.0-next.3 → 1.67.0-next.56
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/README.md +1 -0
- package/package.json +7 -7
- package/lib/browser/constants.d.ts +0 -46
- package/lib/browser/constants.d.ts.map +0 -1
- package/lib/browser/constants.js +0 -18
- package/lib/browser/constants.js.map +0 -1
- package/lib/browser/test-execution-progress-service.d.ts +0 -16
- package/lib/browser/test-execution-progress-service.d.ts.map +0 -1
- package/lib/browser/test-execution-progress-service.js +0 -54
- package/lib/browser/test-execution-progress-service.js.map +0 -1
- package/lib/browser/test-service.d.ts +0 -168
- package/lib/browser/test-service.d.ts.map +0 -1
- package/lib/browser/test-service.js +0 -283
- package/lib/browser/test-service.js.map +0 -1
- package/lib/browser/view/test-context-key-service.d.ts +0 -8
- package/lib/browser/view/test-context-key-service.d.ts.map +0 -1
- package/lib/browser/view/test-context-key-service.js +0 -44
- package/lib/browser/view/test-context-key-service.js.map +0 -1
- package/lib/browser/view/test-execution-state-manager.d.ts +0 -14
- package/lib/browser/view/test-execution-state-manager.d.ts.map +0 -1
- package/lib/browser/view/test-execution-state-manager.js +0 -166
- package/lib/browser/view/test-execution-state-manager.js.map +0 -1
- package/lib/browser/view/test-output-ui-model.d.ts +0 -48
- package/lib/browser/view/test-output-ui-model.d.ts.map +0 -1
- package/lib/browser/view/test-output-ui-model.js +0 -144
- package/lib/browser/view/test-output-ui-model.js.map +0 -1
- package/lib/browser/view/test-output-view-contribution.d.ts +0 -6
- package/lib/browser/view/test-output-view-contribution.d.ts.map +0 -1
- package/lib/browser/view/test-output-view-contribution.js +0 -40
- package/lib/browser/view/test-output-view-contribution.js.map +0 -1
- package/lib/browser/view/test-output-widget.d.ts +0 -24
- package/lib/browser/view/test-output-widget.d.ts.map +0 -1
- package/lib/browser/view/test-output-widget.js +0 -146
- package/lib/browser/view/test-output-widget.js.map +0 -1
- package/lib/browser/view/test-result-view-contribution.d.ts +0 -6
- package/lib/browser/view/test-result-view-contribution.d.ts.map +0 -1
- package/lib/browser/view/test-result-view-contribution.js +0 -40
- package/lib/browser/view/test-result-view-contribution.js.map +0 -1
- package/lib/browser/view/test-result-widget.d.ts +0 -31
- package/lib/browser/view/test-result-widget.d.ts.map +0 -1
- package/lib/browser/view/test-result-widget.js +0 -160
- package/lib/browser/view/test-result-widget.js.map +0 -1
- package/lib/browser/view/test-run-view-contribution.d.ts +0 -18
- package/lib/browser/view/test-run-view-contribution.d.ts.map +0 -1
- package/lib/browser/view/test-run-view-contribution.js +0 -93
- package/lib/browser/view/test-run-view-contribution.js.map +0 -1
- package/lib/browser/view/test-run-widget.d.ts +0 -59
- package/lib/browser/view/test-run-widget.d.ts.map +0 -1
- package/lib/browser/view/test-run-widget.js +0 -300
- package/lib/browser/view/test-run-widget.js.map +0 -1
- package/lib/browser/view/test-tree-widget.d.ts +0 -68
- package/lib/browser/view/test-tree-widget.d.ts.map +0 -1
- package/lib/browser/view/test-tree-widget.js +0 -376
- package/lib/browser/view/test-tree-widget.js.map +0 -1
- package/lib/browser/view/test-view-contribution.d.ts +0 -48
- package/lib/browser/view/test-view-contribution.d.ts.map +0 -1
- package/lib/browser/view/test-view-contribution.js +0 -316
- package/lib/browser/view/test-view-contribution.js.map +0 -1
- package/lib/browser/view/test-view-frontend-module.d.ts +0 -7
- package/lib/browser/view/test-view-frontend-module.d.ts.map +0 -1
- package/lib/browser/view/test-view-frontend-module.js +0 -126
- package/lib/browser/view/test-view-frontend-module.js.map +0 -1
- package/lib/common/collections.d.ts +0 -47
- package/lib/common/collections.d.ts.map +0 -1
- package/lib/common/collections.js +0 -211
- package/lib/common/collections.js.map +0 -1
- package/lib/common/test-preferences.d.ts +0 -14
- package/lib/common/test-preferences.d.ts.map +0 -1
- package/lib/common/test-preferences.js +0 -55
- package/lib/common/test-preferences.js.map +0 -1
- package/lib/common/tree-delta.d.ts +0 -52
- package/lib/common/tree-delta.d.ts.map +0 -1
- package/lib/common/tree-delta.js +0 -241
- package/lib/common/tree-delta.js.map +0 -1
- package/lib/common/tree-delta.spec.d.ts +0 -2
- package/lib/common/tree-delta.spec.d.ts.map +0 -1
- package/lib/common/tree-delta.spec.js +0 -140
- package/lib/common/tree-delta.spec.js.map +0 -1
- package/lib/node/test-backend-module.d.ts +0 -4
- package/lib/node/test-backend-module.d.ts.map +0 -1
- package/lib/node/test-backend-module.js +0 -23
- package/lib/node/test-backend-module.js.map +0 -1
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ The `@theia/test` extension adds the Test view for executing tests in the Theia
|
|
|
16
16
|
|
|
17
17
|
## Additional Information
|
|
18
18
|
|
|
19
|
+
- [API documentation for `@theia/test`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_test.html)
|
|
19
20
|
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
20
21
|
- [Theia - Website](https://theia-ide.org/)
|
|
21
22
|
- [VS Code Timeline Documentation](https://code.visualstudio.com/updates/v1_44#_timeline-view)
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/test",
|
|
3
|
-
"version": "1.67.0-next.
|
|
3
|
+
"version": "1.67.0-next.56+d8f18cc386c",
|
|
4
4
|
"description": "Theia - Test Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.67.0-next.
|
|
7
|
-
"@theia/editor": "1.67.0-next.
|
|
8
|
-
"@theia/filesystem": "1.67.0-next.
|
|
9
|
-
"@theia/navigator": "1.67.0-next.
|
|
10
|
-
"@theia/terminal": "1.67.0-next.
|
|
6
|
+
"@theia/core": "1.67.0-next.56+d8f18cc386c",
|
|
7
|
+
"@theia/editor": "1.67.0-next.56+d8f18cc386c",
|
|
8
|
+
"@theia/filesystem": "1.67.0-next.56+d8f18cc386c",
|
|
9
|
+
"@theia/navigator": "1.67.0-next.56+d8f18cc386c",
|
|
10
|
+
"@theia/terminal": "1.67.0-next.56+d8f18cc386c",
|
|
11
11
|
"xterm": "^5.3.0",
|
|
12
12
|
"xterm-addon-fit": "^0.8.0"
|
|
13
13
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"nyc": {
|
|
51
51
|
"extends": "../../configs/nyc.json"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "d8f18cc386c45a736cd193d42eab02c8f64c6b10"
|
|
54
54
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const enum Testing {
|
|
2
|
-
ViewletId = "workbench.view.extension.test",
|
|
3
|
-
ExplorerViewId = "workbench.view.testing",
|
|
4
|
-
OutputPeekContributionId = "editor.contrib.testingOutputPeek",
|
|
5
|
-
DecorationsContributionId = "editor.contrib.testingDecorations"
|
|
6
|
-
}
|
|
7
|
-
export declare const enum TestCommandId {
|
|
8
|
-
CancelTestRefreshAction = "testing.cancelTestRefresh",
|
|
9
|
-
CancelTestRunAction = "testing.cancelRun",
|
|
10
|
-
ClearTestResultsAction = "testing.clearTestResults",
|
|
11
|
-
CollapseAllAction = "testing.collapseAll",
|
|
12
|
-
ConfigureTestProfilesAction = "testing.configureProfile",
|
|
13
|
-
DebugAction = "testing.debug",
|
|
14
|
-
DebugAllAction = "testing.debugAll",
|
|
15
|
-
DebugAtCursor = "testing.debugAtCursor",
|
|
16
|
-
DebugCurrentFile = "testing.debugCurrentFile",
|
|
17
|
-
DebugFailedTests = "testing.debugFailTests",
|
|
18
|
-
DebugLastRun = "testing.debugLastRun",
|
|
19
|
-
DebugSelectedAction = "testing.debugSelected",
|
|
20
|
-
FilterAction = "workbench.actions.treeView.testExplorer.filter",
|
|
21
|
-
GoToTest = "testing.editFocusedTest",
|
|
22
|
-
HideTestAction = "testing.hideTest",
|
|
23
|
-
OpenOutputPeek = "testing.openOutputPeek",
|
|
24
|
-
RefreshTestsAction = "testing.refreshTests",
|
|
25
|
-
ReRunFailedTests = "testing.reRunFailTests",
|
|
26
|
-
ReRunLastRun = "testing.reRunLastRun",
|
|
27
|
-
RunAction = "testing.run",
|
|
28
|
-
RunAllAction = "testing.runAll",
|
|
29
|
-
RunAtCursor = "testing.runAtCursor",
|
|
30
|
-
RunCurrentFile = "testing.runCurrentFile",
|
|
31
|
-
RunSelectedAction = "testing.runSelected",
|
|
32
|
-
RunUsingProfileAction = "testing.runUsing",
|
|
33
|
-
SearchForTestExtension = "testing.searchForTestExtension",
|
|
34
|
-
SelectDefaultTestProfiles = "testing.selectDefaultTestProfiles",
|
|
35
|
-
ShowMostRecentOutputAction = "testing.showMostRecentOutput",
|
|
36
|
-
TestingSortByDurationAction = "testing.sortByDuration",
|
|
37
|
-
TestingSortByLocationAction = "testing.sortByLocation",
|
|
38
|
-
TestingSortByStatusAction = "testing.sortByStatus",
|
|
39
|
-
TestingViewAsListAction = "testing.viewAsList",
|
|
40
|
-
TestingViewAsTreeAction = "testing.viewAsTree",
|
|
41
|
-
ToggleAutoRun = "testing.toggleautoRun",
|
|
42
|
-
ToggleInlineTestOutput = "testing.toggleInlineTestOutput",
|
|
43
|
-
UnhideTestAction = "testing.unhideTest",
|
|
44
|
-
UnhideAllTestsAction = "testing.unhideAllTests"
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/browser/constants.ts"],"names":[],"mappings":"AAwBA,0BAAkB,OAAO;IAErB,SAAS,kCAAkC;IAC3C,cAAc,2BAA2B;IACzC,wBAAwB,qCAAqC;IAC7D,yBAAyB,sCAAsC;CAClE;AAED,0BAAkB,aAAa;IAC3B,uBAAuB,8BAA8B;IACrD,mBAAmB,sBAAsB;IACzC,sBAAsB,6BAA6B;IACnD,iBAAiB,wBAAwB;IACzC,2BAA2B,6BAA6B;IACxD,WAAW,kBAAkB;IAC7B,cAAc,qBAAqB;IACnC,aAAa,0BAA0B;IACvC,gBAAgB,6BAA6B;IAC7C,gBAAgB,2BAA2B;IAC3C,YAAY,yBAAyB;IACrC,mBAAmB,0BAA0B;IAC7C,YAAY,mDAAmD;IAC/D,QAAQ,4BAA4B;IACpC,cAAc,qBAAqB;IACnC,cAAc,2BAA2B;IACzC,kBAAkB,yBAAyB;IAC3C,gBAAgB,2BAA2B;IAC3C,YAAY,yBAAyB;IACrC,SAAS,gBAAgB;IACzB,YAAY,mBAAmB;IAC/B,WAAW,wBAAwB;IACnC,cAAc,2BAA2B;IACzC,iBAAiB,wBAAwB;IACzC,qBAAqB,qBAAqB;IAC1C,sBAAsB,mCAAmC;IACzD,yBAAyB,sCAAsC;IAC/D,0BAA0B,iCAAiC;IAC3D,2BAA2B,2BAA2B;IACtD,2BAA2B,2BAA2B;IACtD,yBAAyB,yBAAyB;IAClD,uBAAuB,uBAAuB;IAC9C,uBAAuB,uBAAuB;IAC9C,aAAa,0BAA0B;IACvC,sBAAsB,mCAAmC;IACzD,gBAAgB,uBAAuB;IACvC,oBAAoB,2BAA2B;CAClD"}
|
package/lib/browser/constants.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 Mathieu Bussieres and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/browser/constants.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,mDAAmD;AACnD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Widget } from '@theia/core/lib/browser';
|
|
2
|
-
import { TestResultViewContribution } from './view/test-result-view-contribution';
|
|
3
|
-
import { TestViewContribution } from './view/test-view-contribution';
|
|
4
|
-
import { TestPreferences } from '../common/test-preferences';
|
|
5
|
-
export interface TestExecutionProgressService {
|
|
6
|
-
onTestRunRequested(preserveFocus: boolean): Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
export declare const TestExecutionProgressService: unique symbol;
|
|
9
|
-
export declare class DefaultTestExecutionProgressService implements TestExecutionProgressService {
|
|
10
|
-
protected readonly testResultView: TestResultViewContribution;
|
|
11
|
-
protected readonly testView: TestViewContribution;
|
|
12
|
-
protected readonly testPreferences: TestPreferences;
|
|
13
|
-
onTestRunRequested(preserveFocus: boolean): Promise<void>;
|
|
14
|
-
openTestResultView(): Promise<Widget>;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=test-execution-progress-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-execution-progress-service.d.ts","sourceRoot":"","sources":["../../src/browser/test-execution-progress-service.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,WAAW,4BAA4B;IACzC,kBAAkB,CAAC,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D;AAED,eAAO,MAAM,4BAA4B,eAAyC,CAAC;AAEnF,qBACa,mCAAoC,YAAW,4BAA4B;IAGpF,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,0BAA0B,CAAC;IAG9D,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAE9C,kBAAkB,CAAC,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IASzD,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;CAG9C"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2024 STMicroelectronics and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.DefaultTestExecutionProgressService = exports.TestExecutionProgressService = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const test_result_view_contribution_1 = require("./view/test-result-view-contribution");
|
|
22
|
-
const test_view_contribution_1 = require("./view/test-view-contribution");
|
|
23
|
-
const test_preferences_1 = require("../common/test-preferences");
|
|
24
|
-
exports.TestExecutionProgressService = Symbol('TestExecutionProgressService');
|
|
25
|
-
let DefaultTestExecutionProgressService = class DefaultTestExecutionProgressService {
|
|
26
|
-
async onTestRunRequested(preserveFocus) {
|
|
27
|
-
if (!preserveFocus) {
|
|
28
|
-
const openTesting = this.testPreferences['testing.openTesting'];
|
|
29
|
-
if (openTesting === 'openOnTestStart') {
|
|
30
|
-
this.openTestResultView();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
async openTestResultView() {
|
|
35
|
-
return this.testResultView.openView({ activate: true });
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.DefaultTestExecutionProgressService = DefaultTestExecutionProgressService;
|
|
39
|
-
tslib_1.__decorate([
|
|
40
|
-
(0, inversify_1.inject)(test_result_view_contribution_1.TestResultViewContribution),
|
|
41
|
-
tslib_1.__metadata("design:type", test_result_view_contribution_1.TestResultViewContribution)
|
|
42
|
-
], DefaultTestExecutionProgressService.prototype, "testResultView", void 0);
|
|
43
|
-
tslib_1.__decorate([
|
|
44
|
-
(0, inversify_1.inject)(test_view_contribution_1.TestViewContribution),
|
|
45
|
-
tslib_1.__metadata("design:type", test_view_contribution_1.TestViewContribution)
|
|
46
|
-
], DefaultTestExecutionProgressService.prototype, "testView", void 0);
|
|
47
|
-
tslib_1.__decorate([
|
|
48
|
-
(0, inversify_1.inject)(test_preferences_1.TestPreferences),
|
|
49
|
-
tslib_1.__metadata("design:type", Object)
|
|
50
|
-
], DefaultTestExecutionProgressService.prototype, "testPreferences", void 0);
|
|
51
|
-
exports.DefaultTestExecutionProgressService = DefaultTestExecutionProgressService = tslib_1.__decorate([
|
|
52
|
-
(0, inversify_1.injectable)()
|
|
53
|
-
], DefaultTestExecutionProgressService);
|
|
54
|
-
//# sourceMappingURL=test-execution-progress-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-execution-progress-service.js","sourceRoot":"","sources":["../../src/browser/test-execution-progress-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAElE,wFAAkF;AAClF,0EAAqE;AACrE,iEAA6D;AAMhD,QAAA,4BAA4B,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAG5E,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IAW5C,KAAK,CAAC,kBAAkB,CAAC,aAAsB;QAC3C,IAAI,CAAC,aAAa,EAAE,CAAC;YACjB,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;YAChE,IAAI,WAAW,KAAK,iBAAiB,EAAE,CAAC;gBACpC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC9B,CAAC;QACL,CAAC;IACL,CAAC;IAED,KAAK,CAAC,kBAAkB;QACpB,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC;CACJ,CAAA;AAvBY,kFAAmC;AAGzB;IADlB,IAAA,kBAAM,EAAC,0DAA0B,CAAC;sCACA,0DAA0B;2EAAC;AAG3C;IADlB,IAAA,kBAAM,EAAC,6CAAoB,CAAC;sCACA,6CAAoB;qEAAC;AAG/B;IADlB,IAAA,kBAAM,EAAC,kCAAe,CAAC;;4EAC4B;8CAT3C,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;GACA,mCAAmC,CAuB/C"}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { CancellationToken, ContributionProvider, Disposable, Event, QuickPickService } from '@theia/core/lib/common';
|
|
2
|
-
import { Location, Range, Position, DocumentUri } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
3
|
-
import { CollectionDelta, TreeDelta } from '../common/tree-delta';
|
|
4
|
-
import { MarkdownString } from '@theia/core/lib/common/markdown-rendering';
|
|
5
|
-
import URI from '@theia/core/lib/common/uri';
|
|
6
|
-
export declare enum TestRunProfileKind {
|
|
7
|
-
Run = 1,
|
|
8
|
-
Debug = 2,
|
|
9
|
-
Coverage = 3
|
|
10
|
-
}
|
|
11
|
-
export interface TestRunProfile {
|
|
12
|
-
readonly kind: TestRunProfileKind;
|
|
13
|
-
readonly label: string;
|
|
14
|
-
isDefault: boolean;
|
|
15
|
-
readonly canConfigure: boolean;
|
|
16
|
-
readonly tag: string;
|
|
17
|
-
run(name: string, included: readonly TestItem[], excluded: readonly TestItem[], preserveFocus: boolean): void;
|
|
18
|
-
configure(): void;
|
|
19
|
-
}
|
|
20
|
-
export interface TestOutputItem {
|
|
21
|
-
readonly output: string;
|
|
22
|
-
readonly location?: Location;
|
|
23
|
-
}
|
|
24
|
-
export declare enum TestExecutionState {
|
|
25
|
-
Queued = 1,
|
|
26
|
-
Running = 2,
|
|
27
|
-
Passed = 3,
|
|
28
|
-
Failed = 4,
|
|
29
|
-
Skipped = 5,
|
|
30
|
-
Errored = 6
|
|
31
|
-
}
|
|
32
|
-
export interface TestMessage {
|
|
33
|
-
readonly expected?: string;
|
|
34
|
-
readonly actual?: string;
|
|
35
|
-
readonly location?: Location;
|
|
36
|
-
readonly message: string | MarkdownString;
|
|
37
|
-
readonly contextValue?: string;
|
|
38
|
-
readonly stackTrace?: TestMessageStackFrame[];
|
|
39
|
-
}
|
|
40
|
-
export interface TestMessageStackFrame {
|
|
41
|
-
readonly label: string;
|
|
42
|
-
readonly uri?: DocumentUri;
|
|
43
|
-
readonly position?: Position;
|
|
44
|
-
}
|
|
45
|
-
export declare namespace TestMessage {
|
|
46
|
-
function is(obj: unknown): obj is TestMessage;
|
|
47
|
-
}
|
|
48
|
-
export interface TestState {
|
|
49
|
-
readonly state: TestExecutionState;
|
|
50
|
-
}
|
|
51
|
-
export interface TestFailure extends TestState {
|
|
52
|
-
readonly state: TestExecutionState.Failed | TestExecutionState.Errored;
|
|
53
|
-
readonly messages: TestMessage[];
|
|
54
|
-
readonly duration?: number;
|
|
55
|
-
}
|
|
56
|
-
export declare namespace TestFailure {
|
|
57
|
-
function is(obj: unknown): obj is TestFailure;
|
|
58
|
-
}
|
|
59
|
-
export interface TestSuccess extends TestState {
|
|
60
|
-
readonly state: TestExecutionState.Passed;
|
|
61
|
-
readonly duration?: number;
|
|
62
|
-
}
|
|
63
|
-
export interface TestStateChangedEvent {
|
|
64
|
-
test: TestItem;
|
|
65
|
-
oldState: TestState | undefined;
|
|
66
|
-
newState: TestState | undefined;
|
|
67
|
-
}
|
|
68
|
-
export interface TestRun {
|
|
69
|
-
cancel(): void;
|
|
70
|
-
readonly id: string;
|
|
71
|
-
readonly name: string;
|
|
72
|
-
readonly isRunning: boolean;
|
|
73
|
-
readonly controller: TestController;
|
|
74
|
-
onDidChangeProperty: Event<{
|
|
75
|
-
name?: string;
|
|
76
|
-
isRunning?: boolean;
|
|
77
|
-
}>;
|
|
78
|
-
getTestState(item: TestItem): TestState | undefined;
|
|
79
|
-
onDidChangeTestState: Event<TestStateChangedEvent[]>;
|
|
80
|
-
getOutput(item?: TestItem): readonly TestOutputItem[];
|
|
81
|
-
onDidChangeTestOutput: Event<[TestItem | undefined, TestOutputItem][]>;
|
|
82
|
-
readonly items: readonly TestItem[];
|
|
83
|
-
}
|
|
84
|
-
export declare namespace TestRun {
|
|
85
|
-
function is(obj: unknown): obj is TestRun;
|
|
86
|
-
}
|
|
87
|
-
export interface TestItem {
|
|
88
|
-
readonly id: string;
|
|
89
|
-
readonly label: string;
|
|
90
|
-
readonly range?: Range;
|
|
91
|
-
readonly sortKey?: string;
|
|
92
|
-
readonly tags: string[];
|
|
93
|
-
readonly uri?: URI;
|
|
94
|
-
readonly busy: boolean;
|
|
95
|
-
readonly tests: readonly TestItem[];
|
|
96
|
-
readonly description?: string;
|
|
97
|
-
readonly error?: string | MarkdownString;
|
|
98
|
-
readonly parent: TestItem | undefined;
|
|
99
|
-
readonly controller: TestController | undefined;
|
|
100
|
-
readonly canResolveChildren: boolean;
|
|
101
|
-
resolveChildren(): void;
|
|
102
|
-
readonly path: string[];
|
|
103
|
-
}
|
|
104
|
-
export declare namespace TestItem {
|
|
105
|
-
function is(obj: unknown): obj is TestItem;
|
|
106
|
-
}
|
|
107
|
-
export interface TestController {
|
|
108
|
-
readonly id: string;
|
|
109
|
-
readonly label: string;
|
|
110
|
-
readonly tests: readonly TestItem[];
|
|
111
|
-
readonly testRunProfiles: readonly TestRunProfile[];
|
|
112
|
-
readonly testRuns: readonly TestRun[];
|
|
113
|
-
readonly onItemsChanged: Event<TreeDelta<string, TestItem>[]>;
|
|
114
|
-
readonly onRunsChanged: Event<CollectionDelta<TestRun, TestRun>>;
|
|
115
|
-
readonly onProfilesChanged: Event<CollectionDelta<TestRunProfile, TestRunProfile>>;
|
|
116
|
-
refreshTests(token: CancellationToken): Promise<void>;
|
|
117
|
-
clearRuns(): void;
|
|
118
|
-
}
|
|
119
|
-
export interface TestService {
|
|
120
|
-
clearResults(): void;
|
|
121
|
-
configureProfile(): void;
|
|
122
|
-
selectDefaultProfile(): void;
|
|
123
|
-
runTestsWithProfile(tests: TestItem[]): void;
|
|
124
|
-
runTests(profileKind: TestRunProfileKind, tests: TestItem[]): void;
|
|
125
|
-
runAllTests(profileKind: TestRunProfileKind): void;
|
|
126
|
-
getControllers(): TestController[];
|
|
127
|
-
registerTestController(controller: TestController): Disposable;
|
|
128
|
-
onControllersChanged: Event<CollectionDelta<string, TestController>>;
|
|
129
|
-
refresh(): void;
|
|
130
|
-
cancelRefresh(): void;
|
|
131
|
-
isRefreshing: boolean;
|
|
132
|
-
onDidChangeIsRefreshing: Event<void>;
|
|
133
|
-
}
|
|
134
|
-
export declare namespace TestServices {
|
|
135
|
-
function withTestRun(service: TestService, controllerId: string, runId: string): TestRun;
|
|
136
|
-
}
|
|
137
|
-
export declare const TestContribution: unique symbol;
|
|
138
|
-
export interface TestContribution {
|
|
139
|
-
registerTestControllers(service: TestService): void;
|
|
140
|
-
}
|
|
141
|
-
export declare const TestService: unique symbol;
|
|
142
|
-
export declare class DefaultTestService implements TestService {
|
|
143
|
-
quickpickService: QuickPickService;
|
|
144
|
-
private testRunCounter;
|
|
145
|
-
private onDidChangeIsRefreshingEmitter;
|
|
146
|
-
onDidChangeIsRefreshing: Event<void>;
|
|
147
|
-
private controllers;
|
|
148
|
-
private refreshing;
|
|
149
|
-
private onControllersChangedEmitter;
|
|
150
|
-
protected readonly contributionProvider: ContributionProvider<TestContribution>;
|
|
151
|
-
protected registerContributions(): void;
|
|
152
|
-
onControllersChanged: Event<CollectionDelta<string, TestController>>;
|
|
153
|
-
registerTestController(controller: TestController): Disposable;
|
|
154
|
-
getControllers(): TestController[];
|
|
155
|
-
refresh(): void;
|
|
156
|
-
cancelRefresh(): void;
|
|
157
|
-
get isRefreshing(): boolean;
|
|
158
|
-
runAllTests(profileKind: TestRunProfileKind): void;
|
|
159
|
-
protected runTestForController(controller: TestController, profileKind: TestRunProfileKind, items: readonly TestItem[]): Promise<void>;
|
|
160
|
-
protected pickProfile(runProfiles: readonly TestRunProfile[], title: string): Promise<TestRunProfile | undefined>;
|
|
161
|
-
protected pickProfileKind(): Promise<TestRunProfileKind | undefined>;
|
|
162
|
-
runTests(profileKind: TestRunProfileKind, items: TestItem[]): void;
|
|
163
|
-
runTestsWithProfile(items: TestItem[]): void;
|
|
164
|
-
selectDefaultProfile(): void;
|
|
165
|
-
configureProfile(): void;
|
|
166
|
-
clearResults(): void;
|
|
167
|
-
}
|
|
168
|
-
//# sourceMappingURL=test-service.d.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,2BAA2B,CAA0D;IAG7F,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IAGhF,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAIvC,oBAAoB,EAAE,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAA0C;IAE9G,sBAAsB,CAAC,UAAU,EAAE,cAAc,GAAG,UAAU;IAY9D,cAAc,IAAI,cAAc,EAAE;IAIlC,OAAO,IAAI,IAAI;IAgBf,aAAa,IAAI,IAAI;IAQrB,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,WAAW,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;cAMlC,oBAAoB,CAAC,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;cAmB5H,WAAW,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;cAuBvG,eAAe,IAAI,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAgB1E,QAAQ,CAAC,WAAW,EAAE,kBAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI;IAQlE,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI;IAY5C,oBAAoB,IAAI,IAAI;IAe5B,gBAAgB,IAAI,IAAI;IAcxB,YAAY,IAAI,IAAI;CAKvB"}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2022 STMicroelectronics and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.DefaultTestService = exports.TestService = exports.TestContribution = exports.TestServices = exports.TestItem = exports.TestRun = exports.TestFailure = exports.TestMessage = exports.TestExecutionState = exports.TestRunProfileKind = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const common_1 = require("@theia/core/lib/common");
|
|
21
|
-
const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
22
|
-
const markdown_rendering_1 = require("@theia/core/lib/common/markdown-rendering");
|
|
23
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
24
|
-
const collections_1 = require("../common/collections");
|
|
25
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
26
|
-
var TestRunProfileKind;
|
|
27
|
-
(function (TestRunProfileKind) {
|
|
28
|
-
TestRunProfileKind[TestRunProfileKind["Run"] = 1] = "Run";
|
|
29
|
-
TestRunProfileKind[TestRunProfileKind["Debug"] = 2] = "Debug";
|
|
30
|
-
TestRunProfileKind[TestRunProfileKind["Coverage"] = 3] = "Coverage";
|
|
31
|
-
})(TestRunProfileKind || (exports.TestRunProfileKind = TestRunProfileKind = {}));
|
|
32
|
-
var TestExecutionState;
|
|
33
|
-
(function (TestExecutionState) {
|
|
34
|
-
TestExecutionState[TestExecutionState["Queued"] = 1] = "Queued";
|
|
35
|
-
TestExecutionState[TestExecutionState["Running"] = 2] = "Running";
|
|
36
|
-
TestExecutionState[TestExecutionState["Passed"] = 3] = "Passed";
|
|
37
|
-
TestExecutionState[TestExecutionState["Failed"] = 4] = "Failed";
|
|
38
|
-
TestExecutionState[TestExecutionState["Skipped"] = 5] = "Skipped";
|
|
39
|
-
TestExecutionState[TestExecutionState["Errored"] = 6] = "Errored";
|
|
40
|
-
})(TestExecutionState || (exports.TestExecutionState = TestExecutionState = {}));
|
|
41
|
-
var TestMessage;
|
|
42
|
-
(function (TestMessage) {
|
|
43
|
-
function is(obj) {
|
|
44
|
-
return (0, common_1.isObject)(obj) && (markdown_rendering_1.MarkdownString.is(obj.message) || typeof obj.message === 'string');
|
|
45
|
-
}
|
|
46
|
-
TestMessage.is = is;
|
|
47
|
-
})(TestMessage || (exports.TestMessage = TestMessage = {}));
|
|
48
|
-
var TestFailure;
|
|
49
|
-
(function (TestFailure) {
|
|
50
|
-
function is(obj) {
|
|
51
|
-
return (0, common_1.isObject)(obj) && (obj.state === TestExecutionState.Failed || obj.state === TestExecutionState.Errored) && Array.isArray(obj.messages);
|
|
52
|
-
}
|
|
53
|
-
TestFailure.is = is;
|
|
54
|
-
})(TestFailure || (exports.TestFailure = TestFailure = {}));
|
|
55
|
-
var TestRun;
|
|
56
|
-
(function (TestRun) {
|
|
57
|
-
function is(obj) {
|
|
58
|
-
return (0, common_1.isObject)(obj)
|
|
59
|
-
&& typeof obj.cancel === 'function'
|
|
60
|
-
&& typeof obj.name === 'string'
|
|
61
|
-
&& typeof obj.isRunning === 'boolean'
|
|
62
|
-
&& typeof obj.controller === 'object'
|
|
63
|
-
&& typeof obj.onDidChangeProperty === 'function'
|
|
64
|
-
&& typeof obj.getTestState === 'function'
|
|
65
|
-
&& typeof obj.onDidChangeTestState === 'function'
|
|
66
|
-
&& typeof obj.onDidChangeTestState === 'function'
|
|
67
|
-
&& typeof obj.getOutput === 'function'
|
|
68
|
-
&& typeof obj.onDidChangeTestOutput === 'function'
|
|
69
|
-
&& Array.isArray(obj.items);
|
|
70
|
-
}
|
|
71
|
-
TestRun.is = is;
|
|
72
|
-
})(TestRun || (exports.TestRun = TestRun = {}));
|
|
73
|
-
var TestItem;
|
|
74
|
-
(function (TestItem) {
|
|
75
|
-
function is(obj) {
|
|
76
|
-
return (0, common_1.isObject)(obj)
|
|
77
|
-
&& obj.id !== undefined
|
|
78
|
-
&& obj.label !== undefined
|
|
79
|
-
&& Array.isArray(obj.tags)
|
|
80
|
-
&& Array.isArray(obj.tests)
|
|
81
|
-
&& obj.busy !== undefined
|
|
82
|
-
&& obj.canResolveChildren !== undefined
|
|
83
|
-
&& typeof obj.resolveChildren === 'function';
|
|
84
|
-
}
|
|
85
|
-
TestItem.is = is;
|
|
86
|
-
})(TestItem || (exports.TestItem = TestItem = {}));
|
|
87
|
-
var TestServices;
|
|
88
|
-
(function (TestServices) {
|
|
89
|
-
function withTestRun(service, controllerId, runId) {
|
|
90
|
-
const controller = service.getControllers().find(c => c.id === controllerId);
|
|
91
|
-
if (!controller) {
|
|
92
|
-
throw new Error(`No test controller with id '${controllerId}' found`);
|
|
93
|
-
}
|
|
94
|
-
const run = controller.testRuns.find(r => r.id === runId);
|
|
95
|
-
if (!run) {
|
|
96
|
-
throw new Error(`No test run with id '${runId}' found`);
|
|
97
|
-
}
|
|
98
|
-
return run;
|
|
99
|
-
}
|
|
100
|
-
TestServices.withTestRun = withTestRun;
|
|
101
|
-
})(TestServices || (exports.TestServices = TestServices = {}));
|
|
102
|
-
exports.TestContribution = Symbol('TestContribution');
|
|
103
|
-
exports.TestService = Symbol('TestService');
|
|
104
|
-
let DefaultTestService = class DefaultTestService {
|
|
105
|
-
constructor() {
|
|
106
|
-
this.testRunCounter = 0;
|
|
107
|
-
this.onDidChangeIsRefreshingEmitter = new common_1.Emitter();
|
|
108
|
-
this.onDidChangeIsRefreshing = this.onDidChangeIsRefreshingEmitter.event;
|
|
109
|
-
this.controllers = new Map();
|
|
110
|
-
this.refreshing = new Set();
|
|
111
|
-
this.onControllersChangedEmitter = new common_1.Emitter();
|
|
112
|
-
this.onControllersChanged = this.onControllersChangedEmitter.event;
|
|
113
|
-
}
|
|
114
|
-
registerContributions() {
|
|
115
|
-
this.contributionProvider.getContributions().forEach(contribution => contribution.registerTestControllers(this));
|
|
116
|
-
}
|
|
117
|
-
registerTestController(controller) {
|
|
118
|
-
if (this.controllers.has(controller.id)) {
|
|
119
|
-
throw new Error('TestController already registered: ' + controller.id);
|
|
120
|
-
}
|
|
121
|
-
this.controllers.set(controller.id, controller);
|
|
122
|
-
this.onControllersChangedEmitter.fire({ added: [controller] });
|
|
123
|
-
return common_1.Disposable.create(() => {
|
|
124
|
-
this.controllers.delete(controller.id);
|
|
125
|
-
this.onControllersChangedEmitter.fire({ removed: [controller.id] });
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
getControllers() {
|
|
129
|
-
return Array.from(this.controllers.values());
|
|
130
|
-
}
|
|
131
|
-
refresh() {
|
|
132
|
-
const cts = new vscode_languageserver_protocol_1.CancellationTokenSource();
|
|
133
|
-
this.refreshing.add(cts);
|
|
134
|
-
Promise.all(this.getControllers().map(controller => controller.refreshTests(cts.token))).then(() => {
|
|
135
|
-
this.refreshing.delete(cts);
|
|
136
|
-
if (this.refreshing.size === 0) {
|
|
137
|
-
this.onDidChangeIsRefreshingEmitter.fire();
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
if (this.refreshing.size === 1) {
|
|
141
|
-
this.onDidChangeIsRefreshingEmitter.fire();
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
cancelRefresh() {
|
|
145
|
-
if (this.refreshing.size > 0) {
|
|
146
|
-
this.refreshing.forEach(cts => cts.cancel());
|
|
147
|
-
this.refreshing.clear();
|
|
148
|
-
this.onDidChangeIsRefreshingEmitter.fire();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
get isRefreshing() {
|
|
152
|
-
return this.refreshing.size > 0;
|
|
153
|
-
}
|
|
154
|
-
runAllTests(profileKind) {
|
|
155
|
-
this.getControllers().forEach(controller => {
|
|
156
|
-
this.runTestForController(controller, profileKind, controller.tests);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
async runTestForController(controller, profileKind, items) {
|
|
160
|
-
const runProfiles = controller.testRunProfiles.filter(profile => profile.kind === profileKind);
|
|
161
|
-
let activeProfile;
|
|
162
|
-
if (runProfiles.length === 1) {
|
|
163
|
-
activeProfile = runProfiles[0];
|
|
164
|
-
}
|
|
165
|
-
else if (runProfiles.length > 1) {
|
|
166
|
-
const defaultProfile = runProfiles.find(p => p.isDefault);
|
|
167
|
-
if (defaultProfile) {
|
|
168
|
-
activeProfile = defaultProfile;
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
activeProfile = await this.pickProfile(runProfiles, common_1.nls.localizeByDefault('Pick a test profile to use'));
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (activeProfile) {
|
|
175
|
-
activeProfile.run(`Test run #${this.testRunCounter++}`, items, [], true);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
async pickProfile(runProfiles, title) {
|
|
179
|
-
var _a;
|
|
180
|
-
if (runProfiles.length === 0) {
|
|
181
|
-
return undefined;
|
|
182
|
-
}
|
|
183
|
-
// eslint-disable-next-line arrow-body-style
|
|
184
|
-
const picks = runProfiles.map(profile => {
|
|
185
|
-
let iconClasses;
|
|
186
|
-
if (profile.kind === TestRunProfileKind.Run) {
|
|
187
|
-
iconClasses = (0, browser_1.codiconArray)('run');
|
|
188
|
-
}
|
|
189
|
-
else if (profile.kind === TestRunProfileKind.Debug) {
|
|
190
|
-
iconClasses = (0, browser_1.codiconArray)('debug-alt');
|
|
191
|
-
}
|
|
192
|
-
return {
|
|
193
|
-
iconClasses,
|
|
194
|
-
label: `${profile.label}${profile.isDefault ? ' (default)' : ''}`,
|
|
195
|
-
profile: profile
|
|
196
|
-
};
|
|
197
|
-
});
|
|
198
|
-
return (_a = (await this.quickpickService.show(picks, { title: title }))) === null || _a === void 0 ? void 0 : _a.profile;
|
|
199
|
-
}
|
|
200
|
-
async pickProfileKind() {
|
|
201
|
-
var _a;
|
|
202
|
-
// eslint-disable-next-line arrow-body-style
|
|
203
|
-
const picks = [{
|
|
204
|
-
iconClasses: (0, browser_1.codiconArray)('run'),
|
|
205
|
-
label: 'Run',
|
|
206
|
-
kind: TestRunProfileKind.Run
|
|
207
|
-
}, {
|
|
208
|
-
iconClasses: (0, browser_1.codiconArray)('debug-alt'),
|
|
209
|
-
label: 'Debug',
|
|
210
|
-
kind: TestRunProfileKind.Debug
|
|
211
|
-
}];
|
|
212
|
-
return (_a = (await this.quickpickService.show(picks, { title: 'Select the kind of profiles' }))) === null || _a === void 0 ? void 0 : _a.kind;
|
|
213
|
-
}
|
|
214
|
-
runTests(profileKind, items) {
|
|
215
|
-
(0, collections_1.groupBy)(items, item => item.controller).forEach((tests, controller) => {
|
|
216
|
-
if (controller) {
|
|
217
|
-
this.runTestForController(controller, profileKind, tests);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
runTestsWithProfile(items) {
|
|
222
|
-
(0, collections_1.groupBy)(items, item => item.controller).forEach((tests, controller) => {
|
|
223
|
-
if (controller) {
|
|
224
|
-
this.pickProfile(controller.testRunProfiles, common_1.nls.localizeByDefault('Pick a test profile to use')).then(activeProfile => {
|
|
225
|
-
if (activeProfile) {
|
|
226
|
-
activeProfile.run(`Test run #${this.testRunCounter++}`, items, [], true);
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
selectDefaultProfile() {
|
|
233
|
-
this.pickProfileKind().then(kind => {
|
|
234
|
-
const profiles = this.getControllers().flatMap(c => c.testRunProfiles).filter(profile => profile.kind === kind);
|
|
235
|
-
this.pickProfile(profiles, common_1.nls.localizeByDefault('Pick a test profile to use')).then(activeProfile => {
|
|
236
|
-
if (activeProfile) {
|
|
237
|
-
// only change the default for the controller containing selected profile for default and its profiles with same kind
|
|
238
|
-
const controller = this.getControllers().find(c => c.testRunProfiles.includes(activeProfile));
|
|
239
|
-
controller === null || controller === void 0 ? void 0 : controller.testRunProfiles.filter(profile => profile.kind === activeProfile.kind).forEach(profile => {
|
|
240
|
-
profile.isDefault = profile === activeProfile;
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
configureProfile() {
|
|
247
|
-
const profiles = [];
|
|
248
|
-
for (const controller of this.controllers.values()) {
|
|
249
|
-
profiles.push(...controller.testRunProfiles);
|
|
250
|
-
}
|
|
251
|
-
;
|
|
252
|
-
this.pickProfile(profiles.filter(profile => profile.canConfigure), common_1.nls.localizeByDefault('Select a profile to update')).then(profile => {
|
|
253
|
-
if (profile) {
|
|
254
|
-
profile.configure();
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
clearResults() {
|
|
259
|
-
for (const controller of this.controllers.values()) {
|
|
260
|
-
controller.clearRuns();
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
exports.DefaultTestService = DefaultTestService;
|
|
265
|
-
tslib_1.__decorate([
|
|
266
|
-
(0, inversify_1.inject)(common_1.QuickPickService),
|
|
267
|
-
tslib_1.__metadata("design:type", Object)
|
|
268
|
-
], DefaultTestService.prototype, "quickpickService", void 0);
|
|
269
|
-
tslib_1.__decorate([
|
|
270
|
-
(0, inversify_1.inject)(common_1.ContributionProvider),
|
|
271
|
-
(0, inversify_1.named)(exports.TestContribution),
|
|
272
|
-
tslib_1.__metadata("design:type", Object)
|
|
273
|
-
], DefaultTestService.prototype, "contributionProvider", void 0);
|
|
274
|
-
tslib_1.__decorate([
|
|
275
|
-
(0, inversify_1.postConstruct)(),
|
|
276
|
-
tslib_1.__metadata("design:type", Function),
|
|
277
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
278
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
279
|
-
], DefaultTestService.prototype, "registerContributions", null);
|
|
280
|
-
exports.DefaultTestService = DefaultTestService = tslib_1.__decorate([
|
|
281
|
-
(0, inversify_1.injectable)()
|
|
282
|
-
], DefaultTestService);
|
|
283
|
-
//# sourceMappingURL=test-service.js.map
|