import * as _angular_cdk_testing from '@angular/cdk/testing'; import { BaseHarnessFilters, ContentContainerComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing'; import { D as DialogRole, g as MatDialog, i as MatDialogConfig, M as MatDialogRef } from '../../dialog.d-B5HZULyo.js'; import { ComponentType } from '@angular/cdk/overlay'; import { OnDestroy } from '@angular/core'; import '@angular/cdk/bidi'; import '@angular/cdk/a11y'; import 'rxjs'; import '@angular/cdk/dialog'; import '@angular/cdk/portal'; /** A set of criteria that can be used to filter a list of `MatDialogHarness` instances. */ interface DialogHarnessFilters extends BaseHarnessFilters { } /** Selectors for different sections of the mat-dialog that can contain user content. */ declare enum MatDialogSection { TITLE = ".mat-mdc-dialog-title", CONTENT = ".mat-mdc-dialog-content", ACTIONS = ".mat-mdc-dialog-actions" } /** Harness for interacting with a standard `MatDialog` in tests. */ declare class MatDialogHarness extends ContentContainerComponentHarness { /** The selector for the host element of a `MatDialog` instance. */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a dialog with specific attributes. * @param options Options for filtering which dialog instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(this: ComponentHarnessConstructor, options?: DialogHarnessFilters): HarnessPredicate; protected _title: () => Promise<_angular_cdk_testing.TestElement | null>; protected _content: () => Promise<_angular_cdk_testing.TestElement | null>; protected _actions: () => Promise<_angular_cdk_testing.TestElement | null>; /** Gets the id of the dialog. */ getId(): Promise; /** Gets the role of the dialog. */ getRole(): Promise; /** Gets the value of the dialog's "aria-label" attribute. */ getAriaLabel(): Promise; /** Gets the value of the dialog's "aria-labelledby" attribute. */ getAriaLabelledby(): Promise; /** Gets the value of the dialog's "aria-describedby" attribute. */ getAriaDescribedby(): Promise; /** * Closes the dialog by pressing escape. * * Note: this method does nothing if `disableClose` has been set to `true` for the dialog. */ close(): Promise; /** Gets the dialog's text. */ getText(): Promise; /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */ getTitleText(): Promise; /** Gets the dialog's content text. This only works if the dialog is using mat-dialog-content. */ getContentText(): Promise; /** Gets the dialog's actions text. This only works if the dialog is using mat-dialog-actions. */ getActionsText(): Promise; } /** Test component that immediately opens a dialog when bootstrapped. */ declare class MatTestDialogOpener implements OnDestroy { dialog: MatDialog; /** Component that should be opened with the MatDialog `open` method. */ protected static component: ComponentType | undefined; /** Config that should be provided to the MatDialog `open` method. */ protected static config: MatDialogConfig | undefined; /** MatDialogRef returned from the MatDialog `open` method. */ dialogRef: MatDialogRef; /** Data passed to the `MatDialog` close method. */ closedResult: R | undefined; private readonly _afterClosedSubscription; private readonly _ngZone; /** Static method that prepares this class to open the provided component. */ static withComponent(component: ComponentType, config?: MatDialogConfig): ComponentType>; constructor(...args: unknown[]); ngOnDestroy(): void; } declare class MatTestDialogOpenerModule { } export { MatDialogHarness, MatDialogSection, MatTestDialogOpener, MatTestDialogOpenerModule }; export type { DialogHarnessFilters };