[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { ComponentHarness, ComponentHarnessConstructor, HarnessLoader, HarnessPredicate, ContentContainerComponentHarness } from '@angular/cdk/testing';
|
---|
| 9 | import { BaseListItemHarnessFilters, SubheaderHarnessFilters } from './list-harness-filters';
|
---|
| 10 | /**
|
---|
| 11 | * Gets a `HarnessPredicate` that applies the given `BaseListItemHarnessFilters` to the given
|
---|
| 12 | * list item harness.
|
---|
| 13 | * @template H The type of list item harness to create a predicate for.
|
---|
| 14 | * @param harnessType A constructor for a list item harness.
|
---|
| 15 | * @param options An instance of `BaseListItemHarnessFilters` to apply.
|
---|
| 16 | * @return A `HarnessPredicate` for the given harness type with the given options applied.
|
---|
| 17 | */
|
---|
| 18 | export declare function getListItemPredicate<H extends MatListItemHarnessBase>(harnessType: ComponentHarnessConstructor<H>, options: BaseListItemHarnessFilters): HarnessPredicate<H>;
|
---|
| 19 | /** Harness for interacting with a list subheader. */
|
---|
| 20 | export declare class MatSubheaderHarness extends ComponentHarness {
|
---|
| 21 | static hostSelector: string;
|
---|
| 22 | static with(options?: SubheaderHarnessFilters): HarnessPredicate<MatSubheaderHarness>;
|
---|
| 23 | /** Gets the full text content of the list item (including text from any font icons). */
|
---|
| 24 | getText(): Promise<string>;
|
---|
| 25 | }
|
---|
| 26 | /** Selectors for the various list item sections that may contain user content. */
|
---|
| 27 | export declare const enum MatListItemSection {
|
---|
| 28 | CONTENT = ".mat-list-item-content"
|
---|
| 29 | }
|
---|
| 30 | /**
|
---|
| 31 | * Shared behavior among the harnesses for the various `MatListItem` flavors.
|
---|
| 32 | * @docs-private
|
---|
| 33 | */
|
---|
| 34 | export declare abstract class MatListItemHarnessBase extends ContentContainerComponentHarness<MatListItemSection> {
|
---|
| 35 | private _lines;
|
---|
| 36 | private _avatar;
|
---|
| 37 | private _icon;
|
---|
| 38 | /** Gets the full text content of the list item. */
|
---|
| 39 | getText(): Promise<string>;
|
---|
| 40 | /** Gets the lines of text (`mat-line` elements) in this nav list item. */
|
---|
| 41 | getLinesText(): Promise<string[]>;
|
---|
| 42 | /** Whether this list item has an avatar. */
|
---|
| 43 | hasAvatar(): Promise<boolean>;
|
---|
| 44 | /** Whether this list item has an icon. */
|
---|
| 45 | hasIcon(): Promise<boolean>;
|
---|
| 46 | /**
|
---|
| 47 | * Gets a `HarnessLoader` used to get harnesses within the list item's content.
|
---|
| 48 | * @deprecated Use `getChildLoader(MatListItemSection.CONTENT)` or `getHarness` instead.
|
---|
| 49 | * @breaking-change 12.0.0
|
---|
| 50 | */
|
---|
| 51 | getHarnessLoaderForContent(): Promise<HarnessLoader>;
|
---|
| 52 | }
|
---|