UNPKG

@skyux/router

Version:

This library was generated with [Nx](https://nx.dev).

62 lines (56 loc) 1.95 kB
import { HarnessPredicate } from '@angular/cdk/testing'; import { SkyHarnessFilters, SkyComponentHarness } from '@skyux/core/testing'; import * as i0 from '@angular/core'; import { ModuleWithProviders, Provider } from '@angular/core'; import * as i1 from '@skyux/router'; /** * A set of criteria that can be used to filter a list of `SkyHrefHarness` instances. */ interface SkyHrefHarnessFilters extends SkyHarnessFilters { } /** * Allows interaction with a SkyHref directive during testing. */ declare class SkyHrefHarness extends SkyComponentHarness { /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyHrefHarness` that meets certain criteria. */ static with(filters: SkyHrefHarnessFilters): HarnessPredicate<SkyHrefHarness>; /** * Gets the href attribute of the host element. */ getHref(): Promise<string | null>; /** * Gets the visible text. */ getText(): Promise<string>; /** * Returns true if the text is visible. */ isVisible(): Promise<boolean>; } /** * Testing module for the `SkyHref` directive and route resolver. */ declare class SkyHrefTestingModule { static with(options: { userHasAccess: boolean; }): ModuleWithProviders<SkyHrefTestingModule>; static ɵfac: i0.ɵɵFactoryDeclaration<SkyHrefTestingModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SkyHrefTestingModule, never, never, [typeof i1.SkyHrefModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<SkyHrefTestingModule>; } /** * Provides testing services for the `SkyHref` directive and route resolver. * @param options Set whether the user has access to the route. */ declare function provideHrefTesting(options?: { userHasAccess: boolean; }): Provider[]; export { SkyHrefHarness, SkyHrefTestingModule, provideHrefTesting }; export type { SkyHrefHarnessFilters };