Skip to content

Commit 8d47159

Browse files
authored
refactor(tree/testing): change MatNodeHarness to extend ContentContainerComponentHarness (#20591)
1 parent 50d3f29 commit 8d47159

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
*/
88

99
import {
10-
ComponentHarness,
1110
ComponentHarnessConstructor,
12-
HarnessPredicate
11+
ContentContainerComponentHarness,
12+
HarnessPredicate,
1313
} from '@angular/cdk/testing';
1414
import {TreeNodeHarnessFilters} from './tree-harness-filters';
1515
import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';
1616

1717
/** Harness for interacting with a standard Angular Material tree node. */
18-
export class MatTreeNodeHarness extends ComponentHarness {
18+
export class MatTreeNodeHarness extends ContentContainerComponentHarness<string> {
1919
/** The selector of the host element of a `MatTreeNode` instance. */
2020
static hostSelector = '.mat-tree-node, .mat-nested-tree-node';
2121

tools/public_api_guard/material/tree/testing.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export declare class MatTreeHarness extends ComponentHarness {
44
static with(options?: TreeHarnessFilters): HarnessPredicate<MatTreeHarness>;
55
}
66

7-
export declare class MatTreeNodeHarness extends ComponentHarness {
7+
export declare class MatTreeNodeHarness extends ContentContainerComponentHarness<string> {
88
_toggle: import("@angular/cdk/testing").AsyncFactoryFn<import("@angular/cdk/testing").TestElement | null>;
99
collapse(): Promise<void>;
1010
expand(): Promise<void>;

0 commit comments

Comments
 (0)