@codingame/monaco-vscode-testing-service-override 20.1.0 → 20.2.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.
Files changed (36) hide show
  1. package/package.json +14 -14
  2. package/vscode/src/vs/workbench/contrib/debug/browser/callStackWidget.d.ts +6 -0
  3. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackWidget.css +17 -1
  4. package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.d.ts +1 -0
  5. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/index.d.ts +57 -1
  6. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.d.ts +21 -0
  7. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingObjectTree.d.ts +6 -0
  8. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingViewState.d.ts +3 -0
  9. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.d.ts +21 -0
  10. package/vscode/src/vs/workbench/contrib/testing/browser/media/testMessageColorizer.css +9 -0
  11. package/vscode/src/vs/workbench/contrib/testing/browser/media/testing.css +138 -1
  12. package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageBars.d.ts +17 -0
  13. package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.d.ts +50 -0
  14. package/vscode/src/vs/workbench/contrib/testing/browser/testMessageColorizer.d.ts +11 -0
  15. package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.d.ts +5 -0
  16. package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.css +8 -0
  17. package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.d.ts +9 -0
  18. package/vscode/src/vs/workbench/contrib/testing/browser/testingDecorations.d.ts +44 -0
  19. package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.d.ts +15 -0
  20. package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.d.ts +45 -0
  21. package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.d.ts +58 -0
  22. package/vscode/src/vs/workbench/contrib/testing/browser/testingProgressUiService.d.ts +1 -0
  23. package/vscode/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.d.ts +31 -0
  24. package/vscode/src/vs/workbench/contrib/testing/common/storedValue.d.ts +19 -0
  25. package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.d.ts +2 -0
  26. package/vscode/src/vs/workbench/contrib/testing/common/testExclusions.d.ts +18 -0
  27. package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.d.ts +13 -0
  28. package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.d.ts +17 -0
  29. package/vscode/src/vs/workbench/contrib/testing/common/testResultService.d.ts +24 -0
  30. package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.d.ts +34 -0
  31. package/vscode/src/vs/workbench/contrib/testing/common/testService.d.ts +57 -0
  32. package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.d.ts +65 -0
  33. package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.d.ts +7 -0
  34. package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.d.ts +8 -0
  35. package/vscode/src/vs/workbench/contrib/testing/common/testingDecorations.d.ts +16 -0
  36. package/vscode/src/vs/workbench/contrib/testing/common/testingUri.d.ts +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-testing-service-override",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - testing service-override",
6
6
  "keywords": [],
@@ -15,19 +15,19 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common": "20.1.0",
19
- "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "20.1.0",
20
- "@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common": "20.1.0",
21
- "@codingame/monaco-vscode-88141f48-1af9-57ef-a278-f4b2ff6128fa-common": "20.1.0",
22
- "@codingame/monaco-vscode-8bcd87e5-7461-57cf-b4e4-a7b00d2b33df-common": "20.1.0",
23
- "@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "20.1.0",
24
- "@codingame/monaco-vscode-a9da9abe-278d-5ce6-9418-99c7c07c5c37-common": "20.1.0",
25
- "@codingame/monaco-vscode-api": "20.1.0",
26
- "@codingame/monaco-vscode-b99aef83-0d60-5e8c-a62e-9908b6256f35-common": "20.1.0",
27
- "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common": "20.1.0",
28
- "@codingame/monaco-vscode-f24e325c-2ce0-5bba-8236-bfc4f53180ab-common": "20.1.0",
29
- "@codingame/monaco-vscode-f6ab89b2-83b0-5a43-8772-cb0eafa650b5-common": "20.1.0",
30
- "@codingame/monaco-vscode-terminal-service-override": "20.1.0"
18
+ "@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common": "20.2.0",
19
+ "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "20.2.0",
20
+ "@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common": "20.2.0",
21
+ "@codingame/monaco-vscode-88141f48-1af9-57ef-a278-f4b2ff6128fa-common": "20.2.0",
22
+ "@codingame/monaco-vscode-8bcd87e5-7461-57cf-b4e4-a7b00d2b33df-common": "20.2.0",
23
+ "@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "20.2.0",
24
+ "@codingame/monaco-vscode-a9da9abe-278d-5ce6-9418-99c7c07c5c37-common": "20.2.0",
25
+ "@codingame/monaco-vscode-api": "20.2.0",
26
+ "@codingame/monaco-vscode-b99aef83-0d60-5e8c-a62e-9908b6256f35-common": "20.2.0",
27
+ "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common": "20.2.0",
28
+ "@codingame/monaco-vscode-f24e325c-2ce0-5bba-8236-bfc4f53180ab-common": "20.2.0",
29
+ "@codingame/monaco-vscode-f6ab89b2-83b0-5a43-8772-cb0eafa650b5-common": "20.2.0",
30
+ "@codingame/monaco-vscode-terminal-service-override": "20.2.0"
31
31
  },
32
32
  "main": "index.js",
33
33
  "module": "index.js",
@@ -27,6 +27,11 @@ export declare abstract class CustomStackFrame {
27
27
  renderActions?(container: HTMLElement): IDisposable;
28
28
  }
29
29
  export type AnyStackFrame = SkippedCallFrames | CallStackFrame | CustomStackFrame;
30
+ /**
31
+ * A reusable widget that displays a call stack as a series of editors. Note
32
+ * that this both used in debug's exception widget as well as in the testing
33
+ * call stack view.
34
+ */
30
35
  export declare class CallStackWidget extends Disposable {
31
36
  private readonly list;
32
37
  private readonly layoutEmitter;
@@ -36,6 +41,7 @@ export declare class CallStackWidget extends Disposable {
36
41
  get onDidScroll(): Event<import("@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable").ScrollEvent>;
37
42
  get contentHeight(): number;
38
43
  constructor(container: HTMLElement, containingEditor: ICodeEditor | undefined, instantiationService: IInstantiationService);
44
+ /** Replaces the call frames display in the view. */
39
45
  setFrames(frames: AnyStackFrame[]): void;
40
46
  layout(height?: number, width?: number): void;
41
47
  collapseAll(): void;
@@ -1,6 +1,12 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
1
6
  .multiCallStackFrame {
2
7
  .header {
3
8
  display: flex;
9
+
4
10
  align-items: center;
5
11
  height: 24px;
6
12
  background: var(--vscode-multiDiffEditor-headerBackground);
@@ -8,34 +14,42 @@
8
14
  color: var(--vscode-foreground);
9
15
  padding: 0 5px;
10
16
  }
17
+
11
18
  .title {
12
19
  flex-grow: 1;
13
20
  overflow: hidden;
14
21
  text-overflow: ellipsis;
15
22
  white-space: nowrap;
23
+
16
24
  &[role="link"] {
17
25
  cursor: pointer;
18
26
  }
27
+
19
28
  .monaco-icon-label::before {
20
29
  height: auto;
21
30
  }
22
31
  }
32
+
23
33
  &.collapsed {
24
34
  .header {
25
35
  border-bottom: 1px solid var(--vscode-multiDiffEditor-border);
26
36
  }
37
+
27
38
  .editorParent {
28
39
  display: none;
29
40
  }
30
41
  }
42
+
31
43
  .collapse-button {
32
44
  width: 16px;
33
- min-height: 1px;
45
+ min-height: 1px; /* show even if empty */
34
46
  line-height: 0;
47
+
35
48
  a {
36
49
  cursor: pointer;
37
50
  }
38
51
  }
52
+
39
53
  .actions {
40
54
  display: flex;
41
55
  align-items: center;
@@ -43,11 +57,13 @@
43
57
  margin-right: 12px;
44
58
  }
45
59
  }
60
+
46
61
  .multiCallStackWidget {
47
62
  .multiCallStackFrameContainer {
48
63
  background: none !important;
49
64
  }
50
65
  }
66
+
51
67
  .monaco-editor .call-stack-go-to-file-link {
52
68
  text-decoration: underline;
53
69
  cursor: pointer;
@@ -46,6 +46,7 @@ export declare class CoverageDetailsModel {
46
46
  readonly details: CoverageDetails[];
47
47
  readonly ranges: DetailRange[];
48
48
  constructor(details: CoverageDetails[], textModel: ITextModel);
49
+ /** Gets the markdown description for the given detail */
49
50
  describe(detail: CoverageDetailsWithBranch, model: ITextModel): IMarkdownString | undefined;
50
51
  }
51
52
  export {};
@@ -7,26 +7,82 @@ import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/com
7
7
  import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
8
8
  import { ISerializedTestTreeCollapseState } from "./testingViewState.js";
9
9
  import { ITestItemContext, InternalTestItem, TestResultState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testTypes";
10
+ /**
11
+ * Describes a rendering of tests in the explorer view. Different
12
+ * implementations of this are used for trees and lists, and groupings.
13
+ * Originally this was implemented as inline logic within the ViewModel and
14
+ * using a single IncrementalTestChangeCollector, but this became hairy
15
+ * with status projections.
16
+ */
10
17
  export interface ITestTreeProjection extends IDisposable {
18
+ /**
19
+ * Event that fires when the projection changes.
20
+ */
11
21
  onUpdate: Event<void>;
22
+ /**
23
+ * State to use for applying default collapse state of items.
24
+ */
12
25
  lastState: ISerializedTestTreeCollapseState;
26
+ /**
27
+ * Fired when an element in the tree is expanded.
28
+ */
13
29
  expandElement(element: TestItemTreeElement, depth: number): void;
30
+ /**
31
+ * Gets an element by its extension-assigned ID.
32
+ */
14
33
  getElementByTestId(testId: string): TestItemTreeElement | undefined;
34
+ /**
35
+ * Applies pending update to the tree.
36
+ */
15
37
  applyTo(tree: ObjectTree<TestExplorerTreeElement, FuzzyScore>): void;
16
38
  }
17
39
  export declare abstract class TestItemTreeElement {
18
40
  readonly test: InternalTestItem;
41
+ /**
42
+ * Parent tree item. May not actually be the test item who owns this one
43
+ * in a 'flat' projection.
44
+ */
19
45
  readonly parent: TestItemTreeElement | null;
20
46
  protected readonly changeEmitter: Emitter<void>;
47
+ /**
48
+ * Fired whenever the element or test properties change.
49
+ */
21
50
  readonly onChange: Event<void>;
51
+ /**
52
+ * Tree children of this item.
53
+ */
22
54
  readonly children: Set<TestExplorerTreeElement>;
55
+ /**
56
+ * Unique ID of the element in the tree.
57
+ */
23
58
  readonly treeId: string;
59
+ /**
60
+ * Depth of the element in the tree.
61
+ */
24
62
  depth: number;
63
+ /**
64
+ * Whether the node's test result is 'retired' -- from an outdated test run.
65
+ */
25
66
  retired: boolean;
67
+ /**
68
+ * State to show on the item. This is generally the item's computed state
69
+ * from its children.
70
+ */
26
71
  state: TestResultState;
72
+ /**
73
+ * Time it took this test/item to run.
74
+ */
27
75
  duration: number | undefined;
76
+ /**
77
+ * Tree element description.
78
+ */
28
79
  abstract description: string | null;
29
- constructor(test: InternalTestItem, parent?: TestItemTreeElement | null);
80
+ constructor(test: InternalTestItem,
81
+ /**
82
+ * Parent tree item. May not actually be the test item who owns this one
83
+ * in a 'flat' projection.
84
+ */
85
+ parent?: TestItemTreeElement | null);
30
86
  toJSON(): ITestItemContext | {
31
87
  controllerId: string;
32
88
  };
@@ -5,18 +5,39 @@ import { ITestTreeProjection, TestExplorerTreeElement, TestItemTreeElement } fro
5
5
  import { ISerializedTestTreeCollapseState } from "./testingViewState.js";
6
6
  import { ITestResultService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResultService.service";
7
7
  import { ITestService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testService.service";
8
+ /**
9
+ * Projection that lists tests in their traditional tree view.
10
+ */
8
11
  export declare class ListProjection extends Disposable implements ITestTreeProjection {
9
12
  lastState: ISerializedTestTreeCollapseState;
10
13
  private readonly testService;
11
14
  private readonly results;
12
15
  private readonly updateEmitter;
13
16
  private readonly items;
17
+ /**
18
+ * Gets root elements of the tree.
19
+ */
14
20
  private get rootsWithChildren();
21
+ /**
22
+ * @inheritdoc
23
+ */
15
24
  readonly onUpdate: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
16
25
  constructor(lastState: ISerializedTestTreeCollapseState, testService: ITestService, results: ITestResultService);
26
+ /**
27
+ * @inheritdoc
28
+ */
17
29
  getElementByTestId(testId: string): TestItemTreeElement | undefined;
30
+ /**
31
+ * @inheritdoc
32
+ */
18
33
  private applyDiff;
34
+ /**
35
+ * @inheritdoc
36
+ */
19
37
  applyTo(tree: ObjectTree<TestExplorerTreeElement, FuzzyScore>): void;
38
+ /**
39
+ * @inheritdoc
40
+ */
20
41
  expandElement(element: TestItemTreeElement, depth: number): void;
21
42
  private unstoreItem;
22
43
  private _storeItem;
@@ -2,5 +2,11 @@ import { WorkbenchObjectTree } from "@codingame/monaco-vscode-api/vscode/vs/plat
2
2
  import { TestExplorerTreeElement } from "./index.js";
3
3
  import { ISerializedTestTreeCollapseState } from "./testingViewState.js";
4
4
  export declare class TestingObjectTree<TFilterData = void> extends WorkbenchObjectTree<TestExplorerTreeElement, TFilterData> {
5
+ /**
6
+ * Gets a serialized view state for the tree, optimized for storage.
7
+ *
8
+ * @param updatePreviousState Optional previous state to mutate and update
9
+ * instead of creating a new one.
10
+ */
5
11
  getOptimizedViewState(updatePreviousState?: ISerializedTestTreeCollapseState): ISerializedTestTreeCollapseState;
6
12
  }
@@ -5,4 +5,7 @@ export interface ISerializedTestTreeCollapseState {
5
5
  [localId: string]: ISerializedTestTreeCollapseState;
6
6
  };
7
7
  }
8
+ /**
9
+ * Gets whether the given test ID is collapsed.
10
+ */
8
11
  export declare function isCollapsedInSerializedTestTree(serialized: ISerializedTestTreeCollapseState, id: TestId | string): boolean | undefined;
@@ -5,6 +5,9 @@ import { ITestTreeProjection, TestExplorerTreeElement, TestItemTreeElement } fro
5
5
  import { ISerializedTestTreeCollapseState } from "./testingViewState.js";
6
6
  import { ITestResultService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testResultService.service";
7
7
  import { ITestService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testService.service";
8
+ /**
9
+ * Projection that lists tests in their traditional tree view.
10
+ */
8
11
  export declare class TreeProjection extends Disposable implements ITestTreeProjection {
9
12
  lastState: ISerializedTestTreeCollapseState;
10
13
  private readonly testService;
@@ -13,12 +16,30 @@ export declare class TreeProjection extends Disposable implements ITestTreeProje
13
16
  private readonly changedParents;
14
17
  private readonly resortedParents;
15
18
  private readonly items;
19
+ /**
20
+ * Gets root elements of the tree.
21
+ */
16
22
  private get rootsWithChildren();
23
+ /**
24
+ * @inheritdoc
25
+ */
17
26
  readonly onUpdate: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
18
27
  constructor(lastState: ISerializedTestTreeCollapseState, testService: ITestService, results: ITestResultService);
28
+ /**
29
+ * @inheritdoc
30
+ */
19
31
  getElementByTestId(testId: string): TestItemTreeElement | undefined;
32
+ /**
33
+ * @inheritdoc
34
+ */
20
35
  private applyDiff;
36
+ /**
37
+ * @inheritdoc
38
+ */
21
39
  applyTo(tree: ObjectTree<TestExplorerTreeElement, FuzzyScore>): void;
40
+ /**
41
+ * @inheritdoc
42
+ */
22
43
  expandElement(element: TestItemTreeElement, depth: number): void;
23
44
  private createItem;
24
45
  private unstoreItem;
@@ -1,3 +1,8 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
1
6
  .test-output-peek-message-container {
2
7
  .tstm-ansidec-1 {
3
8
  font-weight: bold;
@@ -11,6 +16,7 @@
11
16
  .tstm-ansidec-4 {
12
17
  text-decoration: underline;
13
18
  }
19
+
14
20
  .tstm-ansidec-fg30 { color: var(--vscode-terminal-ansiBlack); }
15
21
  .tstm-ansidec-fg31 { color: var(--vscode-terminal-ansiRed); }
16
22
  .tstm-ansidec-fg32 { color: var(--vscode-terminal-ansiGreen); }
@@ -19,6 +25,7 @@
19
25
  .tstm-ansidec-fg35 { color: var(--vscode-terminal-ansiMagenta); }
20
26
  .tstm-ansidec-fg36 { color: var(--vscode-terminal-ansiCyan); }
21
27
  .tstm-ansidec-fg37 { color: var(--vscode-terminal-ansiWhite); }
28
+
22
29
  .tstm-ansidec-fg90 { color: var(--vscode-terminal-ansiBrightBlack); }
23
30
  .tstm-ansidec-fg91 { color: var(--vscode-terminal-ansiBrightRed); }
24
31
  .tstm-ansidec-fg92 { color: var(--vscode-terminal-ansiBrightGreen); }
@@ -27,6 +34,7 @@
27
34
  .tstm-ansidec-fg95 { color: var(--vscode-terminal-ansiBrightMagenta); }
28
35
  .tstm-ansidec-fg96 { color: var(--vscode-terminal-ansiBrightCyan); }
29
36
  .tstm-ansidec-fg97 { color: var(--vscode-terminal-ansiBrightWhite); }
37
+
30
38
  .tstm-ansidec-bg30 { background-color: var(--vscode-terminal-ansiBlack); }
31
39
  .tstm-ansidec-bg31 { background-color: var(--vscode-terminal-ansiRed); }
32
40
  .tstm-ansidec-bg32 { background-color: var(--vscode-terminal-ansiGreen); }
@@ -35,6 +43,7 @@
35
43
  .tstm-ansidec-bg35 { background-color: var(--vscode-terminal-ansiMagenta); }
36
44
  .tstm-ansidec-bg36 { background-color: var(--vscode-terminal-ansiCyan); }
37
45
  .tstm-ansidec-bg37 { background-color: var(--vscode-terminal-ansiWhite); }
46
+
38
47
  .tstm-ansidec-bg100 { background-color: var(--vscode-terminal-ansiBrightBlack); }
39
48
  .tstm-ansidec-bg101 { background-color: var(--vscode-terminal-ansiBrightRed); }
40
49
  .tstm-ansidec-bg102 { background-color: var(--vscode-terminal-ansiBrightGreen); }