import { DebugElement } from '@angular/core'; import { ComponentFixture } from '@angular/core/testing'; import { Event, Router, UrlSegment } from '@angular/router'; import { Spectator } from '../spectator/spectator'; import { ActivatedRouteStub } from './activated-route-stub'; import { RouteOptions } from './route-options'; /** * @publicApi */ export declare class SpectatorRouting extends Spectator { readonly router: Router; readonly activatedRouteStub?: ActivatedRouteStub | undefined; constructor(fixture: ComponentFixture, debugElement: DebugElement, instance: C, router: Router, activatedRouteStub?: ActivatedRouteStub | undefined); /** * Simulates a route navigation by updating the Params, QueryParams and Data observable streams. */ triggerNavigation(options?: RouteOptions): void; /** * Updates the route params and triggers a route navigation. */ setRouteParam(name: string, value: string): void; /** * Updates the route query params and triggers a route navigation. */ setRouteQueryParam(name: string, value: string): void; /** * Updates the route data and triggers a route navigation. * The `value` is typed as `any` since the `Route#data` is a record with `any` values. * There's no sense to make it generic until `Route#data` starts supporting generic types. */ setRouteData(name: string, value: any): void; /** * Updates the route fragment and triggers a route navigation. */ setRouteFragment(fragment: string | null): void; /** * Updates the route url and triggers a route navigation. */ setRouteUrl(url: UrlSegment[]): void; /** * Emits a router event */ emitRouterEvent(event: Event): void; private triggerNavigationAndUpdate; private checkStubPresent; }