@theia/test 1.43.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/lib/browser/constants.d.ts +46 -0
- package/lib/browser/constants.d.ts.map +1 -0
- package/lib/browser/constants.js +18 -0
- package/lib/browser/constants.js.map +1 -0
- package/lib/browser/test-service.d.ts +150 -0
- package/lib/browser/test-service.d.ts.map +1 -0
- package/lib/browser/test-service.js +240 -0
- package/lib/browser/test-service.js.map +1 -0
- package/lib/browser/view/test-execution-state-manager.d.ts +14 -0
- package/lib/browser/view/test-execution-state-manager.d.ts.map +1 -0
- package/lib/browser/view/test-execution-state-manager.js +174 -0
- package/lib/browser/view/test-execution-state-manager.js.map +1 -0
- package/lib/browser/view/test-output-ui-model.d.ts +46 -0
- package/lib/browser/view/test-output-ui-model.d.ts.map +1 -0
- package/lib/browser/view/test-output-ui-model.js +140 -0
- package/lib/browser/view/test-output-ui-model.js.map +1 -0
- package/lib/browser/view/test-output-view-contribution.d.ts +6 -0
- package/lib/browser/view/test-output-view-contribution.d.ts.map +1 -0
- package/lib/browser/view/test-output-view-contribution.js +48 -0
- package/lib/browser/view/test-output-view-contribution.js.map +1 -0
- package/lib/browser/view/test-output-widget.d.ts +25 -0
- package/lib/browser/view/test-output-widget.d.ts.map +1 -0
- package/lib/browser/view/test-output-widget.js +159 -0
- package/lib/browser/view/test-output-widget.js.map +1 -0
- package/lib/browser/view/test-result-view-contribution.d.ts +6 -0
- package/lib/browser/view/test-result-view-contribution.d.ts.map +1 -0
- package/lib/browser/view/test-result-view-contribution.js +48 -0
- package/lib/browser/view/test-result-view-contribution.js.map +1 -0
- package/lib/browser/view/test-result-widget.d.ts +21 -0
- package/lib/browser/view/test-result-widget.d.ts.map +1 -0
- package/lib/browser/view/test-result-widget.js +109 -0
- package/lib/browser/view/test-result-widget.js.map +1 -0
- package/lib/browser/view/test-run-view-contribution.d.ts +18 -0
- package/lib/browser/view/test-run-view-contribution.d.ts.map +1 -0
- package/lib/browser/view/test-run-view-contribution.js +101 -0
- package/lib/browser/view/test-run-view-contribution.js.map +1 -0
- package/lib/browser/view/test-run-widget.d.ts +59 -0
- package/lib/browser/view/test-run-widget.d.ts.map +1 -0
- package/lib/browser/view/test-run-widget.js +306 -0
- package/lib/browser/view/test-run-widget.js.map +1 -0
- package/lib/browser/view/test-tree-widget.d.ts +68 -0
- package/lib/browser/view/test-tree-widget.d.ts.map +1 -0
- package/lib/browser/view/test-tree-widget.js +387 -0
- package/lib/browser/view/test-tree-widget.js.map +1 -0
- package/lib/browser/view/test-view-contribution.d.ts +46 -0
- package/lib/browser/view/test-view-contribution.d.ts.map +1 -0
- package/lib/browser/view/test-view-contribution.js +289 -0
- package/lib/browser/view/test-view-contribution.js.map +1 -0
- package/lib/browser/view/test-view-frontend-module.d.ts +7 -0
- package/lib/browser/view/test-view-frontend-module.d.ts.map +1 -0
- package/lib/browser/view/test-view-frontend-module.js +120 -0
- package/lib/browser/view/test-view-frontend-module.js.map +1 -0
- package/lib/common/collections.d.ts +47 -0
- package/lib/common/collections.d.ts.map +1 -0
- package/lib/common/collections.js +211 -0
- package/lib/common/collections.js.map +1 -0
- package/lib/common/tree-delta.d.ts +52 -0
- package/lib/common/tree-delta.d.ts.map +1 -0
- package/lib/common/tree-delta.js +241 -0
- package/lib/common/tree-delta.js.map +1 -0
- package/lib/common/tree-delta.spec.d.ts +2 -0
- package/lib/common/tree-delta.spec.d.ts.map +1 -0
- package/lib/common/tree-delta.spec.js +140 -0
- package/lib/common/tree-delta.spec.js.map +1 -0
- package/package.json +53 -0
- package/src/browser/constants.ts +71 -0
- package/src/browser/style/index.css +42 -0
- package/src/browser/test-service.ts +347 -0
- package/src/browser/view/test-execution-state-manager.ts +147 -0
- package/src/browser/view/test-output-ui-model.ts +148 -0
- package/src/browser/view/test-output-view-contribution.ts +34 -0
- package/src/browser/view/test-output-widget.ts +148 -0
- package/src/browser/view/test-result-view-contribution.ts +34 -0
- package/src/browser/view/test-result-widget.ts +92 -0
- package/src/browser/view/test-run-view-contribution.ts +89 -0
- package/src/browser/view/test-run-widget.tsx +266 -0
- package/src/browser/view/test-tree-widget.tsx +360 -0
- package/src/browser/view/test-view-contribution.ts +300 -0
- package/src/browser/view/test-view-frontend-module.ts +132 -0
- package/src/common/collections.ts +223 -0
- package/src/common/tree-delta.spec.ts +166 -0
- package/src/common/tree-delta.ts +259 -0
|
@@ -0,0 +1,46 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { CancellationToken, ContributionProvider, Disposable, Event, QuickPickService } from '@theia/core/lib/common';
|
|
2
|
+
import { Location, Range } 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
|
+
readonly isDefault: boolean;
|
|
15
|
+
readonly canConfigure: boolean;
|
|
16
|
+
readonly tag: string;
|
|
17
|
+
run(name: string, included: readonly TestItem[], excluded: readonly TestItem[]): 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
|
+
}
|
|
38
|
+
export interface TestState {
|
|
39
|
+
readonly state: TestExecutionState;
|
|
40
|
+
}
|
|
41
|
+
export interface TestFailure extends TestState {
|
|
42
|
+
readonly state: TestExecutionState.Failed | TestExecutionState.Errored;
|
|
43
|
+
readonly messages: TestMessage[];
|
|
44
|
+
readonly duration?: number;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace TestFailure {
|
|
47
|
+
function is(obj: unknown): obj is TestFailure;
|
|
48
|
+
}
|
|
49
|
+
export interface TestSuccess extends TestState {
|
|
50
|
+
readonly state: TestExecutionState.Passed;
|
|
51
|
+
readonly duration?: number;
|
|
52
|
+
}
|
|
53
|
+
export interface TestStateChangedEvent {
|
|
54
|
+
test: TestItem;
|
|
55
|
+
oldState: TestState | undefined;
|
|
56
|
+
newState: TestState | undefined;
|
|
57
|
+
}
|
|
58
|
+
export interface TestRun {
|
|
59
|
+
cancel(): void;
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly isRunning: boolean;
|
|
62
|
+
readonly controller: TestController;
|
|
63
|
+
onDidChangeProperty: Event<{
|
|
64
|
+
name?: string;
|
|
65
|
+
isRunning?: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
getTestState(item: TestItem): TestState | undefined;
|
|
68
|
+
onDidChangeTestState: Event<TestStateChangedEvent[]>;
|
|
69
|
+
getOutput(item?: TestItem): readonly TestOutputItem[];
|
|
70
|
+
onDidChangeTestOutput: Event<[TestItem | undefined, TestOutputItem][]>;
|
|
71
|
+
readonly items: readonly TestItem[];
|
|
72
|
+
}
|
|
73
|
+
export declare namespace TestRun {
|
|
74
|
+
function is(obj: unknown): obj is TestRun;
|
|
75
|
+
}
|
|
76
|
+
export interface TestItem {
|
|
77
|
+
readonly id: string;
|
|
78
|
+
readonly label: string;
|
|
79
|
+
readonly range?: Range;
|
|
80
|
+
readonly sortKey?: string;
|
|
81
|
+
readonly tags: string[];
|
|
82
|
+
readonly uri?: URI;
|
|
83
|
+
readonly busy: boolean;
|
|
84
|
+
readonly tests: readonly TestItem[];
|
|
85
|
+
readonly description?: string;
|
|
86
|
+
readonly error?: string | MarkdownString;
|
|
87
|
+
readonly parent: TestItem | undefined;
|
|
88
|
+
readonly controller: TestController | undefined;
|
|
89
|
+
readonly canResolveChildren: boolean;
|
|
90
|
+
resolveChildren(): void;
|
|
91
|
+
}
|
|
92
|
+
export declare namespace TestItem {
|
|
93
|
+
function is(obj: unknown): obj is TestItem;
|
|
94
|
+
}
|
|
95
|
+
export interface TestController {
|
|
96
|
+
readonly id: string;
|
|
97
|
+
readonly label: string;
|
|
98
|
+
readonly tests: readonly TestItem[];
|
|
99
|
+
readonly testRunProfiles: readonly TestRunProfile[];
|
|
100
|
+
readonly testRuns: readonly TestRun[];
|
|
101
|
+
readonly onItemsChanged: Event<TreeDelta<string, TestItem>[]>;
|
|
102
|
+
readonly onRunsChanged: Event<CollectionDelta<TestRun, TestRun>>;
|
|
103
|
+
readonly onProfilesChanged: Event<CollectionDelta<TestRunProfile, TestRunProfile>>;
|
|
104
|
+
refreshTests(token: CancellationToken): Promise<void>;
|
|
105
|
+
clearRuns(): void;
|
|
106
|
+
}
|
|
107
|
+
export interface TestService {
|
|
108
|
+
clearResults(): void;
|
|
109
|
+
configureProfile(): void;
|
|
110
|
+
runTestsWithProfile(tests: TestItem[]): void;
|
|
111
|
+
runTests(profileKind: TestRunProfileKind, tests: TestItem[]): void;
|
|
112
|
+
runAllTests(profileKind: TestRunProfileKind): void;
|
|
113
|
+
getControllers(): TestController[];
|
|
114
|
+
registerTestController(controller: TestController): Disposable;
|
|
115
|
+
onControllersChanged: Event<CollectionDelta<string, TestController>>;
|
|
116
|
+
refresh(): void;
|
|
117
|
+
cancelRefresh(): void;
|
|
118
|
+
isRefreshing: boolean;
|
|
119
|
+
onDidChangeIsRefreshing: Event<void>;
|
|
120
|
+
}
|
|
121
|
+
export declare const TestContribution: unique symbol;
|
|
122
|
+
export interface TestContribution {
|
|
123
|
+
registerTestControllers(service: TestService): void;
|
|
124
|
+
}
|
|
125
|
+
export declare const TestService: unique symbol;
|
|
126
|
+
export declare class DefaultTestService implements TestService {
|
|
127
|
+
quickpickService: QuickPickService;
|
|
128
|
+
private testRunCounter;
|
|
129
|
+
private onDidChangeIsRefreshingEmitter;
|
|
130
|
+
onDidChangeIsRefreshing: Event<void>;
|
|
131
|
+
private controllers;
|
|
132
|
+
private refreshing;
|
|
133
|
+
private onControllersChangedEmitter;
|
|
134
|
+
protected readonly contributionProvider: ContributionProvider<TestContribution>;
|
|
135
|
+
protected registerContributions(): void;
|
|
136
|
+
onControllersChanged: Event<CollectionDelta<string, TestController>>;
|
|
137
|
+
registerTestController(controller: TestController): Disposable;
|
|
138
|
+
getControllers(): TestController[];
|
|
139
|
+
refresh(): void;
|
|
140
|
+
cancelRefresh(): void;
|
|
141
|
+
get isRefreshing(): boolean;
|
|
142
|
+
runAllTests(profileKind: TestRunProfileKind): void;
|
|
143
|
+
protected runTestForController(controller: TestController, profileKind: TestRunProfileKind, items: readonly TestItem[]): Promise<void>;
|
|
144
|
+
protected pickProfile(runProfiles: readonly TestRunProfile[], title: string): Promise<TestRunProfile | undefined>;
|
|
145
|
+
runTests(profileKind: TestRunProfileKind, items: TestItem[]): void;
|
|
146
|
+
runTestsWithProfile(items: TestItem[]): void;
|
|
147
|
+
configureProfile(): void;
|
|
148
|
+
clearResults(): void;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=test-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-service.d.ts","sourceRoot":"","sources":["../../src/browser/test-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAW,KAAK,EAAE,gBAAgB,EAAiB,MAAM,wBAAwB,CAAC;AAC9I,OAAO,EA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+
"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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.DefaultTestService = exports.TestService = exports.TestContribution = exports.TestItem = exports.TestRun = exports.TestFailure = exports.TestExecutionState = exports.TestRunProfileKind = void 0;
|
|
28
|
+
const common_1 = require("@theia/core/lib/common");
|
|
29
|
+
const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
30
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
31
|
+
const collections_1 = require("../common/collections");
|
|
32
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
33
|
+
var TestRunProfileKind;
|
|
34
|
+
(function (TestRunProfileKind) {
|
|
35
|
+
TestRunProfileKind[TestRunProfileKind["Run"] = 1] = "Run";
|
|
36
|
+
TestRunProfileKind[TestRunProfileKind["Debug"] = 2] = "Debug";
|
|
37
|
+
TestRunProfileKind[TestRunProfileKind["Coverage"] = 3] = "Coverage";
|
|
38
|
+
})(TestRunProfileKind = exports.TestRunProfileKind || (exports.TestRunProfileKind = {}));
|
|
39
|
+
var TestExecutionState;
|
|
40
|
+
(function (TestExecutionState) {
|
|
41
|
+
TestExecutionState[TestExecutionState["Queued"] = 1] = "Queued";
|
|
42
|
+
TestExecutionState[TestExecutionState["Running"] = 2] = "Running";
|
|
43
|
+
TestExecutionState[TestExecutionState["Passed"] = 3] = "Passed";
|
|
44
|
+
TestExecutionState[TestExecutionState["Failed"] = 4] = "Failed";
|
|
45
|
+
TestExecutionState[TestExecutionState["Skipped"] = 5] = "Skipped";
|
|
46
|
+
TestExecutionState[TestExecutionState["Errored"] = 6] = "Errored";
|
|
47
|
+
})(TestExecutionState = exports.TestExecutionState || (exports.TestExecutionState = {}));
|
|
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 || (exports.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 || (exports.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 || (exports.TestItem = {}));
|
|
87
|
+
exports.TestContribution = Symbol('TestContribution');
|
|
88
|
+
exports.TestService = Symbol('TestService');
|
|
89
|
+
let DefaultTestService = class DefaultTestService {
|
|
90
|
+
constructor() {
|
|
91
|
+
this.testRunCounter = 0;
|
|
92
|
+
this.onDidChangeIsRefreshingEmitter = new common_1.Emitter();
|
|
93
|
+
this.onDidChangeIsRefreshing = this.onDidChangeIsRefreshingEmitter.event;
|
|
94
|
+
this.controllers = new Map();
|
|
95
|
+
this.refreshing = new Set();
|
|
96
|
+
this.onControllersChangedEmitter = new common_1.Emitter();
|
|
97
|
+
this.onControllersChanged = this.onControllersChangedEmitter.event;
|
|
98
|
+
}
|
|
99
|
+
registerContributions() {
|
|
100
|
+
this.contributionProvider.getContributions().forEach(contribution => contribution.registerTestControllers(this));
|
|
101
|
+
}
|
|
102
|
+
registerTestController(controller) {
|
|
103
|
+
if (this.controllers.has(controller.id)) {
|
|
104
|
+
throw new Error('TestController already registered: ' + controller.id);
|
|
105
|
+
}
|
|
106
|
+
this.controllers.set(controller.id, controller);
|
|
107
|
+
this.onControllersChangedEmitter.fire({ added: [controller] });
|
|
108
|
+
return common_1.Disposable.create(() => {
|
|
109
|
+
this.controllers.delete(controller.id);
|
|
110
|
+
this.onControllersChangedEmitter.fire({ removed: [controller.id] });
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
getControllers() {
|
|
114
|
+
return Array.from(this.controllers.values());
|
|
115
|
+
}
|
|
116
|
+
refresh() {
|
|
117
|
+
const cts = new vscode_languageserver_protocol_1.CancellationTokenSource();
|
|
118
|
+
this.refreshing.add(cts);
|
|
119
|
+
Promise.all(this.getControllers().map(controller => controller.refreshTests(cts.token))).then(() => {
|
|
120
|
+
this.refreshing.delete(cts);
|
|
121
|
+
if (this.refreshing.size === 0) {
|
|
122
|
+
this.onDidChangeIsRefreshingEmitter.fire();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
if (this.refreshing.size === 1) {
|
|
126
|
+
this.onDidChangeIsRefreshingEmitter.fire();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
cancelRefresh() {
|
|
130
|
+
if (this.refreshing.size > 0) {
|
|
131
|
+
this.refreshing.forEach(cts => cts.cancel());
|
|
132
|
+
this.refreshing.clear();
|
|
133
|
+
this.onDidChangeIsRefreshingEmitter.fire();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
get isRefreshing() {
|
|
137
|
+
return this.refreshing.size > 0;
|
|
138
|
+
}
|
|
139
|
+
runAllTests(profileKind) {
|
|
140
|
+
this.getControllers().forEach(controller => {
|
|
141
|
+
this.runTestForController(controller, profileKind, controller.tests);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
async runTestForController(controller, profileKind, items) {
|
|
145
|
+
const runProfiles = controller.testRunProfiles.filter(profile => profile.kind === profileKind);
|
|
146
|
+
let activeProfile;
|
|
147
|
+
if (runProfiles.length === 1) {
|
|
148
|
+
activeProfile = runProfiles[0];
|
|
149
|
+
}
|
|
150
|
+
else if (runProfiles.length > 1) {
|
|
151
|
+
const defaultProfile = runProfiles.find(p => p.isDefault);
|
|
152
|
+
if (defaultProfile) {
|
|
153
|
+
activeProfile = defaultProfile;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
activeProfile = await this.pickProfile(runProfiles, common_1.nls.localizeByDefault('Pick a test profile to use'));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (activeProfile) {
|
|
160
|
+
activeProfile.run(`Test run #${this.testRunCounter++}`, items, []);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
async pickProfile(runProfiles, title) {
|
|
164
|
+
var _a;
|
|
165
|
+
if (runProfiles.length === 0) {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
// eslint-disable-next-line arrow-body-style
|
|
169
|
+
const picks = runProfiles.map(profile => {
|
|
170
|
+
let iconClasses;
|
|
171
|
+
if (profile.kind === TestRunProfileKind.Run) {
|
|
172
|
+
iconClasses = (0, browser_1.codiconArray)('run');
|
|
173
|
+
}
|
|
174
|
+
else if (profile.kind === TestRunProfileKind.Debug) {
|
|
175
|
+
iconClasses = (0, browser_1.codiconArray)('debug-alt');
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
iconClasses,
|
|
179
|
+
label: profile.label,
|
|
180
|
+
profile: profile
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
return (_a = (await this.quickpickService.show(picks, { title: title }))) === null || _a === void 0 ? void 0 : _a.profile;
|
|
184
|
+
}
|
|
185
|
+
runTests(profileKind, items) {
|
|
186
|
+
(0, collections_1.groupBy)(items, item => item.controller).forEach((tests, controller) => {
|
|
187
|
+
if (controller) {
|
|
188
|
+
this.runTestForController(controller, profileKind, tests);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
runTestsWithProfile(items) {
|
|
193
|
+
(0, collections_1.groupBy)(items, item => item.controller).forEach((tests, controller) => {
|
|
194
|
+
if (controller) {
|
|
195
|
+
this.pickProfile(controller.testRunProfiles, common_1.nls.localizeByDefault('Pick a test profile to use')).then(activeProfile => {
|
|
196
|
+
if (activeProfile) {
|
|
197
|
+
activeProfile.run(`Test run #${this.testRunCounter++}`, items, []);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
configureProfile() {
|
|
204
|
+
const profiles = [];
|
|
205
|
+
for (const controller of this.controllers.values()) {
|
|
206
|
+
profiles.push(...controller.testRunProfiles);
|
|
207
|
+
}
|
|
208
|
+
;
|
|
209
|
+
this.pickProfile(profiles.filter(profile => profile.canConfigure), common_1.nls.localizeByDefault('Select a profile to update')).then(profile => {
|
|
210
|
+
if (profile) {
|
|
211
|
+
profile.configure();
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
clearResults() {
|
|
216
|
+
for (const controller of this.controllers.values()) {
|
|
217
|
+
controller.clearRuns();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, inversify_1.inject)(common_1.QuickPickService),
|
|
223
|
+
__metadata("design:type", Object)
|
|
224
|
+
], DefaultTestService.prototype, "quickpickService", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
(0, inversify_1.inject)(common_1.ContributionProvider),
|
|
227
|
+
(0, inversify_1.named)(exports.TestContribution),
|
|
228
|
+
__metadata("design:type", Object)
|
|
229
|
+
], DefaultTestService.prototype, "contributionProvider", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
(0, inversify_1.postConstruct)(),
|
|
232
|
+
__metadata("design:type", Function),
|
|
233
|
+
__metadata("design:paramtypes", []),
|
|
234
|
+
__metadata("design:returntype", void 0)
|
|
235
|
+
], DefaultTestService.prototype, "registerContributions", null);
|
|
236
|
+
DefaultTestService = __decorate([
|
|
237
|
+
(0, inversify_1.injectable)()
|
|
238
|
+
], DefaultTestService);
|
|
239
|
+
exports.DefaultTestService = DefaultTestService;
|
|
240
|
+
//# sourceMappingURL=test-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-service.js","sourceRoot":"","sources":["../../src/browser/test-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,mDAA8I;AAC9I,sGAA6G;AAI7G,4DAAwF;AACxF,uDAAgD;AAChD,qDAAuD;AAEvD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,yDAAO,CAAA;IACP,6DAAS,CAAA;IACT,mEAAY,CAAA;AAChB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAiBD,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC1B,+DAAU,CAAA;IACV,iEAAW,CAAA;IACX,+DAAU,CAAA;IACV,+DAAU,CAAA;IACV,iEAAW,CAAA;IACX,iEAAW,CAAA;AACf,CAAC,EAPW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAO7B;AAmBD,IAAiB,WAAW,CAI3B;AAJD,WAAiB,WAAW;IACxB,SAAgB,EAAE,CAAC,GAAY;QAC3B,OAAO,IAAA,iBAAQ,EAAc,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,kBAAkB,CAAC,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BQ,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAyJ9B;AAzJY,gDAAkB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TestController, TestExecutionState, TestItem, TestRun, TestService } from '../test-service';
|
|
2
|
+
/**
|
|
3
|
+
* This class manages the state of "internal" nodes in the test tree
|
|
4
|
+
*/
|
|
5
|
+
export declare class TestExecutionStateManager {
|
|
6
|
+
protected readonly testService: TestService;
|
|
7
|
+
private executionStates;
|
|
8
|
+
init(): void;
|
|
9
|
+
addController(controller: TestController): void;
|
|
10
|
+
addRun(run: TestRun): void;
|
|
11
|
+
protected updateState(run: TestRun, item: TestItem, oldState: TestExecutionState | undefined, newState: TestExecutionState | undefined): void;
|
|
12
|
+
getComputedState(run: TestRun, item: TestItem): TestExecutionState | undefined;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=test-execution-state-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-execution-state-manager.d.ts","sourceRoot":"","sources":["../../../src/browser/view/test-execution-state-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErG;;GAEG;AACH,qBACa,yBAAyB;IAElC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAE5C,OAAO,CAAC,eAAe,CAA6C;IAGpE,IAAI,IAAI,IAAI;IAMZ,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI;IAS/C,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAS1B,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,GAAG,SAAS,EAAE,QAAQ,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAK7I,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,kBAAkB,GAAG,SAAS;CAGjF"}
|