UNPKG

@salesforce/salesforcedx-vscode-test-tools

Version:
52 lines (51 loc) 2.98 kB
import { Duration } from '../core/miscellaneous'; /** * Waits for a notification with the specified message to disappear * @param notificationMessage - Regular expression to match the notification message * @param durationInSeconds - Maximum duration to wait for the notification to go away */ export declare function waitForNotificationToGoAway(notificationMessage: RegExp, durationInSeconds: Duration): Promise<void>; /** * Checks if a notification with the specified message is present * @param notificationMessage - Regular expression to match the notification message * @returns True if the notification is present, false otherwise */ export declare function notificationIsPresent(notificationMessage: RegExp): Promise<boolean>; /** * Checks if a notification with the specified message is present within a timeout period * @param notificationMessage - Regular expression to match the notification message * @param durationInSeconds - Maximum duration to wait for the notification to appear * @returns True if the notification is present within the timeout, false otherwise */ export declare function notificationIsPresentWithTimeout(notificationMessage: RegExp, durationInSeconds: Duration): Promise<boolean>; /** * Checks if a notification with the specified message is absent * @param notificationMessage - Regular expression to match the notification message * @returns True if the notification is absent, false otherwise */ export declare function notificationIsAbsent(notificationMessage: RegExp): Promise<boolean>; /** * Checks if a notification with the specified message is absent within a timeout period * @param notificationMessage - Regular expression to match the notification message * @param durationInSeconds - Maximum duration to wait for the notification to be absent * @returns True if the notification is absent within the timeout, false otherwise */ export declare function notificationIsAbsentWithTimeout(notificationMessage: RegExp, durationInSeconds: Duration): Promise<boolean>; /** * Dismisses a notification with the specified message * @param notificationMessage - Regular expression to match the notification message * @param timeout - Maximum duration to wait for the notification to appear before dismissing */ export declare function dismissNotification(notificationMessage: RegExp, timeout?: Duration): Promise<void>; /** * Accepts a notification by clicking an action button * @param notificationMessage - The notification message to look for * @param actionName - The name of the action button to click * @param timeout - Maximum duration to wait for the notification * @returns True if the action was successfully clicked, false otherwise */ export declare function acceptNotification(notificationMessage: string, actionName: string, timeout: Duration): Promise<boolean>; /** * Dismisses all notifications in the notifications center */ export declare function dismissAllNotifications(): Promise<void>;