UNPKG

@eclipse-scout/core

Version:
27 lines 1.41 kB
/// <reference types="jquery" /> import { SomePartial, UiNotificationDo, UiNotificationSystem } from '../../index'; export declare class UiNotificationsMock { /** * Replaces the default {@link UiNotificationSystem} with {@link LocalUiNotificationSystem}. */ static register(): void; /** * Unregisters the {@link LocalUiNotificationSystem} so the default {@link UiNotificationSystem} will be active. */ static unregister(): void; /** * Simulates publishing a notification that will trigger the subscribed handlers without issuing any http requests. * The required {@link LocalUiNotificationSystem} is registered automatically during tests unless {@link UiNotificationsMock.unregister} is called explicitly. */ static putNotification(notification: SomePartial<UiNotificationDo, 'id' | 'nodeId' | 'creationTime'>, system?: string): void; } /** * A local system that does not use a {@link UiNotificationPoller} and therefore does not issue any http requests. * Publishing a notification can be simulated by using {@link putNotification}. */ export declare class LocalUiNotificationSystem extends UiNotificationSystem { whenSubscriptionStart(topic: string): JQuery.Promise<string>; updatePoller(): void; put(notification: SomePartial<UiNotificationDo, 'id' | 'nodeId' | 'creationTime'>): void; } //# sourceMappingURL=UiNotificationsMock.d.ts.map