/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { HarnessPredicate } from '@angular/cdk/testing'; import { MatLegacyListHarnessBase } from './list-harness-base'; import { getListItemPredicate, MatLegacyListItemHarnessBase } from './list-item-harness-base'; /** * Harness for interacting with a standard mat-list in tests. * @deprecated Use `MatListHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. * @breaking-change 17.0.0 */ export class MatLegacyListHarness extends MatLegacyListHarnessBase { constructor() { super(...arguments); this._itemHarness = MatLegacyListItemHarness; } /** The selector for the host element of a `MatList` instance. */ static { this.hostSelector = '.mat-list:not(mat-action-list)'; } /** * Gets a `HarnessPredicate` that can be used to search for a `MatListHarness` that meets certain * criteria. * @param options Options for filtering which list instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options = {}) { return new HarnessPredicate(MatLegacyListHarness, options); } } /** * Harness for interacting with a list item. * @deprecated Use `MatListItemHarness` from `@angular/material/list/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. * @breaking-change 17.0.0 */ export class MatLegacyListItemHarness extends MatLegacyListItemHarnessBase { /** The selector for the host element of a `MatListItem` instance. */ static { this.hostSelector = `${MatLegacyListHarness.hostSelector} .mat-list-item`; } /** * Gets a `HarnessPredicate` that can be used to search for a `MatListItemHarness` that meets * certain criteria. * @param options Options for filtering which list item instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options = {}) { return getListItemPredicate(MatLegacyListItemHarness, options); } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC1oYXJuZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21hdGVyaWFsL2xlZ2FjeS1saXN0L3Rlc3RpbmcvbGlzdC1oYXJuZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiO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