Skip to content

Commit e2685e1

Browse files
committed
fix imports and add entrypoint to config.bzl
1 parent 9305f99 commit e2685e1

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

src/material/config.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ entryPoints = [
6565
"tooltip",
6666
"tooltip/testing",
6767
"tree",
68+
"tree/testing",
6869
"form-field/testing",
6970
"form-field/testing/control",
7071
"input/testing",

src/material/tree/testing/node-harness.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,6 @@ export class MatTreeNodeHarness extends ComponentHarness {
5050
return (await this.host()).text({exclude: '.mat-tree-node, .mat-nested-tree-node, button'});
5151
}
5252

53-
/** Gets all of the nodes under this node. */
54-
async getAllDescendants(filter: TreeNodeHarnessFilters = {}): Promise<MatTreeNodeHarness[]> {
55-
if (await this._isNestedNode()) {
56-
return this.locatorForAll(MatTreeNodeHarness.with(filter))();
57-
} else {
58-
throw Error('not implemented');
59-
}
60-
}
61-
62-
/** Gets the immediate children nodes under this node. */
63-
async getChildren(filter: TreeNodeHarnessFilters = {}): Promise<MatTreeNodeHarness[]> {
64-
if (await this._isNestedNode()) {
65-
filter.level = await this.getLevel() + 1;
66-
return this.getAllDescendants(filter);
67-
} else {
68-
throw Error('not implemented');
69-
}
70-
}
71-
7253
/** Toggles node between expanded/collapsed. Only works when node is not disabled. */
7354
async toggle(): Promise<void> {
7455
const toggle = await this._toggle();
@@ -90,10 +71,6 @@ export class MatTreeNodeHarness extends ComponentHarness {
9071
await this.toggle();
9172
}
9273
}
93-
94-
private async _isNestedNode() {
95-
return (await this.host()).hasClass('mat-nested-tree-node');
96-
}
9774
}
9875

9976
function getNodePredicate<T extends MatTreeNodeHarness>(

src/material/tree/testing/tree-harness.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
*/
88

99
import {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';
10-
import {
11-
MatTreeNodeHarness,
12-
TreeHarnessFilters,
13-
TreeNodeHarnessFilters
14-
} from '@angular/material/tree/testing';
10+
import {MatTreeNodeHarness} from './node-harness';
11+
import {TreeHarnessFilters, TreeNodeHarnessFilters} from './tree-harness-filters';
1512

1613
/** Harness for interacting with a standard mat-tree in tests. */
1714
export class MatTreeHarness extends ComponentHarness {

0 commit comments

Comments
 (0)