import { ComponentHarness, BaseHarnessFilters, HarnessPredicate } from '@angular/cdk/testing'; /** Harness filters for ComToastHarness. */ interface ComToastHarnessFilters extends BaseHarnessFilters { /** Filter by the toast's message text. */ message?: string | RegExp; /** Filter by the toast's title text. */ title?: string | RegExp; } /** Harness filters for ComToastContainerHarness. */ type ComToastContainerHarnessFilters = BaseHarnessFilters; /** * Harness for interacting with an individual toast notification in tests. * * Because toasts are rendered inside a CDK overlay, use * `TestbedHarnessEnvironment.documentRootLoader(fixture)` or * `documentRootLocatorFactory()` to locate them. */ declare class ComToastHarness extends ComponentHarness { static hostSelector: string; private readonly innerDiv; private readonly titleEl; private readonly messageEl; private readonly closeButton; private readonly actionButton; /** * Gets a HarnessPredicate for matching toasts. * @param options Filter options. */ static with(options?: ComToastHarnessFilters): HarnessPredicate; /** Gets the ARIA role of the toast (`"alert"` or `"status"`). */ getRole(): Promise; /** Gets the `aria-live` value of the toast (`"assertive"` or `"polite"`). */ getAriaLive(): Promise; /** Gets the `data-state` attribute (`"open"` or `"closed"`). */ getState(): Promise; /** * Gets the toast's title text, or `null` if no title is present. */ getTitleText(): Promise; /** Gets the toast's message text. */ getMessageText(): Promise; /** Whether the toast has an action button. */ hasAction(): Promise; /** Gets the action button's text, or `null` if no action exists. */ getActionText(): Promise; /** * Clicks the action button. * @throws If no action button is present. */ clickAction(): Promise; /** Whether the toast has a close (dismiss) button. */ isDismissible(): Promise; /** * Clicks the close button to dismiss the toast. * @throws If no close button is present. */ dismiss(): Promise; /** Whether the toast is disabled. */ isDisabled(): Promise; /** Whether the toast host is focused. */ isFocused(): Promise; /** Focuses the toast host element. */ focus(): Promise; /** Blurs the toast host element. */ blur(): Promise; } /** * Harness for interacting with the toast container in tests. * * The container is rendered in a CDK overlay. Use * `TestbedHarnessEnvironment.documentRootLoader(fixture)` to locate it. */ declare class ComToastContainerHarness extends ComponentHarness { static hostSelector: string; private readonly regionDiv; /** * Gets a HarnessPredicate for matching toast containers. * @param options Filter options. */ static with(options?: ComToastContainerHarnessFilters): HarnessPredicate; /** Gets the container's `aria-label` attribute. */ getAriaLabel(): Promise; /** Gets all toast harnesses inside the container, optionally filtered. */ getToasts(filters?: ComToastHarnessFilters): Promise; /** Gets the number of toasts currently in the container. */ getToastCount(): Promise; /** Gets the message text of all toasts. */ getToastMessages(): Promise; } export { ComToastContainerHarness, ComToastHarness }; export type { ComToastContainerHarnessFilters, ComToastHarnessFilters };