source: trip-planner-front/node_modules/@angular/material/paginator/testing/paginator-harness.d.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.8 KB
Line 
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 */
8import { AsyncFactoryFn, ComponentHarness, HarnessPredicate, TestElement } from '@angular/cdk/testing';
9import { MatSelectHarness } from '@angular/material/select/testing';
10import { PaginatorHarnessFilters } from './paginator-harness-filters';
11export declare abstract class _MatPaginatorHarnessBase extends ComponentHarness {
12 protected abstract _nextButton: AsyncFactoryFn<TestElement>;
13 protected abstract _previousButton: AsyncFactoryFn<TestElement>;
14 protected abstract _firstPageButton: AsyncFactoryFn<TestElement | null>;
15 protected abstract _lastPageButton: AsyncFactoryFn<TestElement | null>;
16 protected abstract _select: AsyncFactoryFn<(ComponentHarness & {
17 getValueText(): Promise<string>;
18 clickOptions(...filters: unknown[]): Promise<void>;
19 }) | null>;
20 protected abstract _pageSizeFallback: AsyncFactoryFn<TestElement>;
21 protected abstract _rangeLabel: AsyncFactoryFn<TestElement>;
22 /** Goes to the next page in the paginator. */
23 goToNextPage(): Promise<void>;
24 /** Goes to the previous page in the paginator. */
25 goToPreviousPage(): Promise<void>;
26 /** Goes to the first page in the paginator. */
27 goToFirstPage(): Promise<void>;
28 /** Goes to the last page in the paginator. */
29 goToLastPage(): Promise<void>;
30 /**
31 * Sets the page size of the paginator.
32 * @param size Page size that should be select.
33 */
34 setPageSize(size: number): Promise<void>;
35 /** Gets the page size of the paginator. */
36 getPageSize(): Promise<number>;
37 /** Gets the text of the range labe of the paginator. */
38 getRangeLabel(): Promise<string>;
39}
40/** Harness for interacting with a standard mat-paginator in tests. */
41export declare class MatPaginatorHarness extends _MatPaginatorHarnessBase {
42 /** Selector used to find paginator instances. */
43 static hostSelector: string;
44 protected _nextButton: AsyncFactoryFn<TestElement>;
45 protected _previousButton: AsyncFactoryFn<TestElement>;
46 protected _firstPageButton: AsyncFactoryFn<TestElement | null>;
47 protected _lastPageButton: AsyncFactoryFn<TestElement | null>;
48 protected _select: AsyncFactoryFn<MatSelectHarness | null>;
49 protected _pageSizeFallback: AsyncFactoryFn<TestElement>;
50 protected _rangeLabel: AsyncFactoryFn<TestElement>;
51 /**
52 * Gets a `HarnessPredicate` that can be used to search for a `MatPaginatorHarness` that meets
53 * certain criteria.
54 * @param options Options for filtering which paginator instances are considered a match.
55 * @return a `HarnessPredicate` configured with the given options.
56 */
57 static with(options?: PaginatorHarnessFilters): HarnessPredicate<MatPaginatorHarness>;
58}
Note: See TracBrowser for help on using the repository browser.