import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing'; import { SortDirection } from '@angular/material/sort'; import { MultiSortHeaderHarnessFilters } from './mat-multi-sort-harness-filters'; /** * Interface for the definition of the sorting of 1 table column * @param columnId - The id (name) of the column used for sorting. * @param direction - The current sorting direction (e.g. 'asc'). */ export interface DomSortingDefinition { id: string; label: string; sortDirection: SortDirection; sortPosition: number; } /** Harness for interacting with a sAngular Material multi sort header in tests. */ export declare class MatMultiSortHeaderHarness extends ComponentHarness { static hostSelector: string; private _containerContent; private _badgeContent; /** * Gets a `HarnessPredicate` that can be used to * search for a sort header with specific attributes. * @param options - Options for narrowing the search. * @returns predicate for identifying the sut */ static with(options?: MultiSortHeaderHarnessFilters): HarnessPredicate; /** * Gets the label of the sort header. * @returns the label of the sort header. */ getLabel(): Promise; /** * Gets the id of the sort header. * @returns the id of the sort header. */ getId(): Promise; /** * Gets the sorting direction of the header. * @returns the sorting direction of the sort header. */ getSortDirection(): Promise; /** * Gets the sorting position of the header. * @returns the sorting position of the sort header. */ getSortPosition(): Promise; /** * Gets object with id, sortDirection and sortPosition * @returns an object with all information about the sort header. */ getAllSortData(): Promise; /** * Gets whether the sort header is currently being sorted by. * @returns true if the sort header is used for sorting. */ isActive(): Promise; /** * Whether the sort header is disabled. * @returns true if the sort header is disabled. */ isDisabled(): Promise; /** * Clicks the header to change its sorting direction. * Only works if the header is enabled. * @returns promise that completes after clicking the header. */ click(): Promise; /** * Gets the id of the sort header. * @param host - TestElement to be inspected (from 'await this.host()'). * @returns promise that completes when id of the header is available. */ private _getId; /** * Gets the sorting direction of the header. * @param host - TestElement to be inspected (from 'await this.host()'). * @returns promise that completes when SortDirection is available. */ private _getSortDirection; }