/** * @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 { MatLegacySelectHarness } from '@angular/material/legacy-select/testing'; import { _MatPaginatorHarnessBase, } from '@angular/material/paginator/testing'; /** * Harness for interacting with a standard mat-paginator in tests. * @deprecated Use `MatPaginatorHarness` from `@angular/material/paginator/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. * @breaking-change 17.0.0 */ export class MatLegacyPaginatorHarness extends _MatPaginatorHarnessBase { constructor() { super(...arguments); this._nextButton = this.locatorFor('.mat-paginator-navigation-next'); this._previousButton = this.locatorFor('.mat-paginator-navigation-previous'); this._firstPageButton = this.locatorForOptional('.mat-paginator-navigation-first'); this._lastPageButton = this.locatorForOptional('.mat-paginator-navigation-last'); this._select = this.locatorForOptional(MatLegacySelectHarness.with({ ancestor: '.mat-paginator-page-size', })); this._pageSizeFallback = this.locatorFor('.mat-paginator-page-size-value'); this._rangeLabel = this.locatorFor('.mat-paginator-range-label'); } /** Selector used to find paginator instances. */ static { this.hostSelector = '.mat-paginator'; } /** * Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets * certain criteria. * @param options Options for filtering which paginator instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options = {}) { return new HarnessPredicate(MatLegacyPaginatorHarness, options); } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnaW5hdG9yLWhhcm5lc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvbGVnYWN5LXBhZ2luYXRvci90ZXN0aW5nL3BhZ2luYXRvci1oYXJuZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQU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