diff --git a/src/material/dialog/testing/BUILD.bazel b/src/material/dialog/testing/BUILD.bazel index 43bd25e08ab2..706d27852e6b 100644 --- a/src/material/dialog/testing/BUILD.bazel +++ b/src/material/dialog/testing/BUILD.bazel @@ -12,9 +12,9 @@ ts_library( "//src/cdk/overlay", "//src/cdk/testing", "//src/material/dialog", - "//src/material/legacy-dialog/testing", "@npm//@angular/core", "@npm//@angular/platform-browser", + "@npm//rxjs", ], ) diff --git a/src/material/legacy-dialog/testing/dialog-harness-filters.ts b/src/material/dialog/testing/dialog-harness-filters.ts similarity index 82% rename from src/material/legacy-dialog/testing/dialog-harness-filters.ts rename to src/material/dialog/testing/dialog-harness-filters.ts index ce5d31b9adf5..465b361043dc 100644 --- a/src/material/legacy-dialog/testing/dialog-harness-filters.ts +++ b/src/material/dialog/testing/dialog-harness-filters.ts @@ -9,4 +9,4 @@ import {BaseHarnessFilters} from '@angular/cdk/testing'; /** A set of criteria that can be used to filter a list of `MatDialogHarness` instances. */ -export interface LegacyDialogHarnessFilters extends BaseHarnessFilters {} +export interface DialogHarnessFilters extends BaseHarnessFilters {} diff --git a/src/material/dialog/testing/dialog-harness.ts b/src/material/dialog/testing/dialog-harness.ts index cd5a11243f77..49fb48be94f0 100644 --- a/src/material/dialog/testing/dialog-harness.ts +++ b/src/material/dialog/testing/dialog-harness.ts @@ -6,11 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import {ComponentHarnessConstructor, HarnessPredicate} from '@angular/cdk/testing'; import { - LegacyDialogHarnessFilters, - _MatLegacyDialogHarnessBase, -} from '@angular/material/legacy-dialog/testing'; + ComponentHarnessConstructor, + ContentContainerComponentHarness, + HarnessPredicate, + TestKey, +} from '@angular/cdk/testing'; +import {DialogHarnessFilters} from './dialog-harness-filters'; +import {DialogRole} from '@angular/material/dialog'; /** Selectors for different sections of the mat-dialog that can contain user content. */ export const enum MatDialogSection { @@ -19,8 +22,75 @@ export const enum MatDialogSection { ACTIONS = '.mat-mdc-dialog-actions', } +/** Base class for the `MatDialogHarness` implementation. */ +export class _MatDialogHarnessBase + // @breaking-change 14.0.0 change generic type to MatDialogSection. + extends ContentContainerComponentHarness +{ + protected _title = this.locatorForOptional(MatDialogSection.TITLE); + protected _content = this.locatorForOptional(MatDialogSection.CONTENT); + protected _actions = this.locatorForOptional(MatDialogSection.ACTIONS); + + /** Gets the id of the dialog. */ + async getId(): Promise { + const id = await (await this.host()).getAttribute('id'); + // In case no id has been specified, the "id" property always returns + // an empty string. To make this method more explicit, we return null. + return id !== '' ? id : null; + } + + /** Gets the role of the dialog. */ + async getRole(): Promise { + return (await this.host()).getAttribute('role') as Promise; + } + + /** Gets the value of the dialog's "aria-label" attribute. */ + async getAriaLabel(): Promise { + return (await this.host()).getAttribute('aria-label'); + } + + /** Gets the value of the dialog's "aria-labelledby" attribute. */ + async getAriaLabelledby(): Promise { + return (await this.host()).getAttribute('aria-labelledby'); + } + + /** Gets the value of the dialog's "aria-describedby" attribute. */ + async getAriaDescribedby(): Promise { + return (await this.host()).getAttribute('aria-describedby'); + } + + /** + * Closes the dialog by pressing escape. + * + * Note: this method does nothing if `disableClose` has been set to `true` for the dialog. + */ + async close(): Promise { + await (await this.host()).sendKeys(TestKey.ESCAPE); + } + + /** Gets te dialog's text. */ + async getText() { + return (await this.host()).text(); + } + + /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */ + async getTitleText() { + return (await this._title())?.text() ?? ''; + } + + /** Gets the dialog's content text. This only works if the dialog is using mat-dialog-content. */ + async getContentText() { + return (await this._content())?.text() ?? ''; + } + + /** Gets the dialog's actions text. This only works if the dialog is using mat-dialog-actions. */ + async getActionsText() { + return (await this._actions())?.text() ?? ''; + } +} + /** Harness for interacting with a standard `MatDialog` in tests. */ -export class MatDialogHarness extends _MatLegacyDialogHarnessBase { +export class MatDialogHarness extends _MatDialogHarnessBase { /** The selector for the host element of a `MatDialog` instance. */ static hostSelector = '.mat-mdc-dialog-container'; @@ -31,12 +101,8 @@ export class MatDialogHarness extends _MatLegacyDialogHarnessBase { */ static with( this: ComponentHarnessConstructor, - options: LegacyDialogHarnessFilters = {}, + options: DialogHarnessFilters = {}, ): HarnessPredicate { return new HarnessPredicate(this, options); } - - protected override _title = this.locatorForOptional(MatDialogSection.TITLE); - protected override _content = this.locatorForOptional(MatDialogSection.CONTENT); - protected override _actions = this.locatorForOptional(MatDialogSection.ACTIONS); } diff --git a/src/material/dialog/testing/dialog-opener.ts b/src/material/dialog/testing/dialog-opener.ts index 6cea8260b724..67f489634187 100644 --- a/src/material/dialog/testing/dialog-opener.ts +++ b/src/material/dialog/testing/dialog-opener.ts @@ -7,15 +7,65 @@ */ import {ComponentType} from '@angular/cdk/overlay'; -import {ChangeDetectionStrategy, Component, NgModule, ViewEncapsulation} from '@angular/core'; -import {_MatTestLegacyDialogOpenerBase} from '@angular/material/legacy-dialog/testing'; +import { + ChangeDetectionStrategy, + Component, + Directive, + NgModule, + OnDestroy, + ViewEncapsulation, +} from '@angular/core'; import { MatDialog, + MatDialogConfig, MatDialogContainer, MatDialogModule, - MatDialogConfig, + _MatDialogBase, + _MatDialogContainerBase, + MatDialogRef, } from '@angular/material/dialog'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; +import {Subscription} from 'rxjs'; + +/** Base class for a component that immediately opens a dialog when created. */ +@Directive() +export class _MatTestDialogOpenerBase + implements OnDestroy +{ + /** 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: Subscription; + + constructor(public dialog: _MatDialogBase) { + if (!_MatTestDialogOpenerBase.component) { + throw new Error(`MatTestDialogOpener does not have a component provided.`); + } + + this.dialogRef = this.dialog.open( + _MatTestDialogOpenerBase.component as ComponentType, + _MatTestDialogOpenerBase.config || {}, + ); + this._afterClosedSubscription = this.dialogRef.afterClosed().subscribe(result => { + this.closedResult = result; + }); + } + + ngOnDestroy() { + this._afterClosedSubscription.unsubscribe(); + _MatTestDialogOpenerBase.component = undefined; + _MatTestDialogOpenerBase.config = undefined; + } +} /** Test component that immediately opens a dialog when bootstrapped. */ @Component({ @@ -24,7 +74,7 @@ import {NoopAnimationsModule} from '@angular/platform-browser/animations'; changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) -export class MatTestDialogOpener extends _MatTestLegacyDialogOpenerBase< +export class MatTestDialogOpener extends _MatTestDialogOpenerBase< MatDialogContainer, T, R @@ -38,8 +88,8 @@ export class MatTestDialogOpener extends _MatTestLegac component: ComponentType, config?: MatDialogConfig, ) { - _MatTestLegacyDialogOpenerBase.component = component; - _MatTestLegacyDialogOpenerBase.config = config; + _MatTestDialogOpenerBase.component = component; + _MatTestDialogOpenerBase.config = config; return MatTestDialogOpener as ComponentType>; } } diff --git a/src/material/dialog/testing/index.ts b/src/material/dialog/testing/index.ts index 676ca90f1ffa..e1d43c50691f 100644 --- a/src/material/dialog/testing/index.ts +++ b/src/material/dialog/testing/index.ts @@ -7,3 +7,4 @@ */ export * from './public-api'; +export {_MatDialogHarnessBase} from './dialog-harness'; diff --git a/src/material/dialog/testing/public-api.ts b/src/material/dialog/testing/public-api.ts index a62e231bc6b7..15333c650f38 100644 --- a/src/material/dialog/testing/public-api.ts +++ b/src/material/dialog/testing/public-api.ts @@ -6,6 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -export {LegacyDialogHarnessFilters} from '@angular/material/legacy-dialog/testing'; +export {DialogHarnessFilters} from './dialog-harness-filters'; export {MatDialogHarness, MatDialogSection} from './dialog-harness'; export * from './dialog-opener'; diff --git a/src/material/legacy-dialog/testing/BUILD.bazel b/src/material/legacy-dialog/testing/BUILD.bazel index e3739d7bfe1f..325ef96d27f6 100644 --- a/src/material/legacy-dialog/testing/BUILD.bazel +++ b/src/material/legacy-dialog/testing/BUILD.bazel @@ -12,6 +12,7 @@ ts_library( "//src/cdk/coercion", "//src/cdk/overlay", "//src/cdk/testing", + "//src/material/dialog/testing", "//src/material/legacy-dialog", "@npm//@angular/core", "@npm//@angular/platform-browser", diff --git a/src/material/legacy-dialog/testing/dialog-harness.ts b/src/material/legacy-dialog/testing/dialog-harness.ts index b64741b74ba3..492a4a0e6721 100644 --- a/src/material/legacy-dialog/testing/dialog-harness.ts +++ b/src/material/legacy-dialog/testing/dialog-harness.ts @@ -6,9 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {ContentContainerComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing'; -import {LegacyDialogRole} from '@angular/material/legacy-dialog'; -import {LegacyDialogHarnessFilters} from './dialog-harness-filters'; +import {HarnessPredicate} from '@angular/cdk/testing'; +import {_MatDialogHarnessBase, DialogHarnessFilters} from '@angular/material/dialog/testing'; /** Selectors for different sections of the mat-dialog that can contain user content. */ export const enum MatLegacyDialogSection { @@ -17,75 +16,8 @@ export const enum MatLegacyDialogSection { ACTIONS = '.mat-dialog-actions', } -/** Base class for the `MatDialogHarness` implementation. */ -export class _MatLegacyDialogHarnessBase - // @breaking-change 14.0.0 change generic type to MatDialogSection. - extends ContentContainerComponentHarness -{ - protected _title = this.locatorForOptional(MatLegacyDialogSection.TITLE); - protected _content = this.locatorForOptional(MatLegacyDialogSection.CONTENT); - protected _actions = this.locatorForOptional(MatLegacyDialogSection.ACTIONS); - - /** Gets the id of the dialog. */ - async getId(): Promise { - const id = await (await this.host()).getAttribute('id'); - // In case no id has been specified, the "id" property always returns - // an empty string. To make this method more explicit, we return null. - return id !== '' ? id : null; - } - - /** Gets the role of the dialog. */ - async getRole(): Promise { - return (await this.host()).getAttribute('role') as Promise; - } - - /** Gets the value of the dialog's "aria-label" attribute. */ - async getAriaLabel(): Promise { - return (await this.host()).getAttribute('aria-label'); - } - - /** Gets the value of the dialog's "aria-labelledby" attribute. */ - async getAriaLabelledby(): Promise { - return (await this.host()).getAttribute('aria-labelledby'); - } - - /** Gets the value of the dialog's "aria-describedby" attribute. */ - async getAriaDescribedby(): Promise { - return (await this.host()).getAttribute('aria-describedby'); - } - - /** - * Closes the dialog by pressing escape. - * - * Note: this method does nothing if `disableClose` has been set to `true` for the dialog. - */ - async close(): Promise { - await (await this.host()).sendKeys(TestKey.ESCAPE); - } - - /** Gets te dialog's text. */ - async getText() { - return (await this.host()).text(); - } - - /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */ - async getTitleText() { - return (await this._title())?.text() ?? ''; - } - - /** Gets the dialog's content text. This only works if the dialog is using mat-dialog-content. */ - async getContentText() { - return (await this._content())?.text() ?? ''; - } - - /** Gets the dialog's actions text. This only works if the dialog is using mat-dialog-actions. */ - async getActionsText() { - return (await this._actions())?.text() ?? ''; - } -} - /** Harness for interacting with a standard `MatDialog` in tests. */ -export class MatLegacyDialogHarness extends _MatLegacyDialogHarnessBase { +export class MatLegacyDialogHarness extends _MatDialogHarnessBase { // Developers can provide a custom component or template for the // dialog. The canonical dialog parent is the "MatDialogContainer". /** The selector for the host element of a `MatDialog` instance. */ @@ -97,7 +29,11 @@ export class MatLegacyDialogHarness extends _MatLegacyDialogHarnessBase { * @param options Options for filtering which dialog instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ - static with(options: LegacyDialogHarnessFilters = {}): HarnessPredicate { + static with(options: DialogHarnessFilters = {}): HarnessPredicate { return new HarnessPredicate(MatLegacyDialogHarness, options); } + + protected override _title = this.locatorForOptional(MatLegacyDialogSection.TITLE); + protected override _content = this.locatorForOptional(MatLegacyDialogSection.CONTENT); + protected override _actions = this.locatorForOptional(MatLegacyDialogSection.ACTIONS); } diff --git a/src/material/legacy-dialog/testing/dialog-opener.ts b/src/material/legacy-dialog/testing/dialog-opener.ts index c7246c37296e..9d9a16142bf2 100644 --- a/src/material/legacy-dialog/testing/dialog-opener.ts +++ b/src/material/legacy-dialog/testing/dialog-opener.ts @@ -7,65 +7,15 @@ */ import {ComponentType} from '@angular/cdk/overlay'; -import { - ChangeDetectionStrategy, - Component, - Directive, - NgModule, - OnDestroy, - ViewEncapsulation, -} from '@angular/core'; +import {ChangeDetectionStrategy, Component, NgModule, ViewEncapsulation} from '@angular/core'; import { MatLegacyDialog, + MatLegacyDialogConfig, MatLegacyDialogContainer, MatLegacyDialogModule, - MatLegacyDialogRef, - _MatLegacyDialogBase, - _MatLegacyDialogContainerBase, - MatLegacyDialogConfig, } from '@angular/material/legacy-dialog'; -import {Subscription} from 'rxjs'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; - -/** Base class for a component that immediately opens a dialog when created. */ -@Directive() -export class _MatTestLegacyDialogOpenerBase - implements OnDestroy -{ - /** 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: MatLegacyDialogConfig | undefined; - - /** MatDialogRef returned from the MatDialog `open` method. */ - dialogRef: MatLegacyDialogRef; - - /** Data passed to the `MatDialog` close method. */ - closedResult: R | undefined; - - private readonly _afterClosedSubscription: Subscription; - - constructor(public dialog: _MatLegacyDialogBase) { - if (!_MatTestLegacyDialogOpenerBase.component) { - throw new Error(`MatTestDialogOpener does not have a component provided.`); - } - - this.dialogRef = this.dialog.open( - _MatTestLegacyDialogOpenerBase.component as ComponentType, - _MatTestLegacyDialogOpenerBase.config || {}, - ); - this._afterClosedSubscription = this.dialogRef.afterClosed().subscribe(result => { - this.closedResult = result; - }); - } - - ngOnDestroy() { - this._afterClosedSubscription.unsubscribe(); - _MatTestLegacyDialogOpenerBase.component = undefined; - _MatTestLegacyDialogOpenerBase.config = undefined; - } -} +import {_MatTestDialogOpenerBase} from '@angular/material/dialog/testing'; /** Test component that immediately opens a dialog when created. */ @Component({ @@ -74,10 +24,11 @@ export class _MatTestLegacyDialogOpenerBase extends _MatTestLegacyDialogOpenerBase { +export class MatTestLegacyDialogOpener extends _MatTestDialogOpenerBase< + MatLegacyDialogContainer, + T, + R +> { constructor(dialog: MatLegacyDialog) { super(dialog); } @@ -87,8 +38,8 @@ export class MatTestLegacyDialogOpener< component: ComponentType, config?: MatLegacyDialogConfig, ) { - _MatTestLegacyDialogOpenerBase.component = component; - _MatTestLegacyDialogOpenerBase.config = config; + _MatTestDialogOpenerBase.component = component; + _MatTestDialogOpenerBase.config = config; return MatTestLegacyDialogOpener as ComponentType>; } } diff --git a/src/material/legacy-dialog/testing/public-api.ts b/src/material/legacy-dialog/testing/public-api.ts index cdda39f93035..f357a4e9fe9a 100644 --- a/src/material/legacy-dialog/testing/public-api.ts +++ b/src/material/legacy-dialog/testing/public-api.ts @@ -7,5 +7,5 @@ */ export * from './dialog-harness'; -export * from './dialog-harness-filters'; export * from './dialog-opener'; +export {DialogHarnessFilters as LegacyDialogHarnessFilters} from '@angular/material/dialog/testing'; diff --git a/tools/public_api_guard/material/dialog-testing.md b/tools/public_api_guard/material/dialog-testing.md index 7c2932721627..e9fd4144e519 100644 --- a/tools/public_api_guard/material/dialog-testing.md +++ b/tools/public_api_guard/material/dialog-testing.md @@ -5,29 +5,49 @@ ```ts import { AsyncFactoryFn } from '@angular/cdk/testing'; +import { BaseHarnessFilters } from '@angular/cdk/testing'; import { ComponentHarnessConstructor } from '@angular/cdk/testing'; import { ComponentType } from '@angular/cdk/overlay'; +import { ContentContainerComponentHarness } from '@angular/cdk/testing'; +import { DialogRole } from '@angular/material/dialog'; import { HarnessPredicate } from '@angular/cdk/testing'; -import { LegacyDialogHarnessFilters } from '@angular/material/legacy-dialog/testing'; import { MatDialog } from '@angular/material/dialog'; +import { _MatDialogBase } from '@angular/material/dialog'; import { MatDialogConfig } from '@angular/material/dialog'; import { MatDialogContainer } from '@angular/material/dialog'; -import { _MatLegacyDialogHarnessBase } from '@angular/material/legacy-dialog/testing'; -import { _MatTestLegacyDialogOpenerBase } from '@angular/material/legacy-dialog/testing'; +import { _MatDialogContainerBase } from '@angular/material/dialog'; +import { MatDialogRef } from '@angular/material/dialog'; +import { OnDestroy } from '@angular/core'; import { TestElement } from '@angular/cdk/testing'; -export { LegacyDialogHarnessFilters } +// @public +export interface DialogHarnessFilters extends BaseHarnessFilters { +} + +// @public +export class MatDialogHarness extends _MatDialogHarnessBase { + static hostSelector: string; + static with(this: ComponentHarnessConstructor, options?: DialogHarnessFilters): HarnessPredicate; +} // @public -export class MatDialogHarness extends _MatLegacyDialogHarnessBase { +export class _MatDialogHarnessBase extends ContentContainerComponentHarness { // (undocumented) protected _actions: AsyncFactoryFn; + close(): Promise; // (undocumented) protected _content: AsyncFactoryFn; - static hostSelector: string; + getActionsText(): Promise; + getAriaDescribedby(): Promise; + getAriaLabel(): Promise; + getAriaLabelledby(): Promise; + getContentText(): Promise; + getId(): Promise; + getRole(): Promise; + getText(): Promise; + getTitleText(): Promise; // (undocumented) protected _title: AsyncFactoryFn; - static with(this: ComponentHarnessConstructor, options?: LegacyDialogHarnessFilters): HarnessPredicate; } // @public @@ -41,11 +61,24 @@ export const enum MatDialogSection { } // @public -export class MatTestDialogOpener extends _MatTestLegacyDialogOpenerBase { +export class MatTestDialogOpener extends _MatTestDialogOpenerBase { constructor(dialog: MatDialog); static withComponent(component: ComponentType, config?: MatDialogConfig): ComponentType>; } +// @public +export class _MatTestDialogOpenerBase implements OnDestroy { + constructor(dialog: _MatDialogBase); + closedResult: R | undefined; + protected static component: ComponentType | undefined; + protected static config: MatDialogConfig | undefined; + // (undocumented) + dialog: _MatDialogBase; + dialogRef: MatDialogRef; + // (undocumented) + ngOnDestroy(): void; +} + // @public (undocumented) export class MatTestDialogOpenerModule { } diff --git a/tools/public_api_guard/material/legacy-dialog-testing.md b/tools/public_api_guard/material/legacy-dialog-testing.md index 318f1daeaa72..8cbc0409a24e 100644 --- a/tools/public_api_guard/material/legacy-dialog-testing.md +++ b/tools/public_api_guard/material/legacy-dialog-testing.md @@ -5,48 +5,28 @@ ```ts import { AsyncFactoryFn } from '@angular/cdk/testing'; -import { BaseHarnessFilters } from '@angular/cdk/testing'; import { ComponentType } from '@angular/cdk/overlay'; -import { ContentContainerComponentHarness } from '@angular/cdk/testing'; import { HarnessPredicate } from '@angular/cdk/testing'; -import { LegacyDialogRole } from '@angular/material/legacy-dialog'; +import { DialogHarnessFilters as LegacyDialogHarnessFilters } from '@angular/material/dialog/testing'; +import { _MatDialogHarnessBase } from '@angular/material/dialog/testing'; import { MatLegacyDialog } from '@angular/material/legacy-dialog'; -import { _MatLegacyDialogBase } from '@angular/material/legacy-dialog'; import { MatLegacyDialogConfig } from '@angular/material/legacy-dialog'; import { MatLegacyDialogContainer } from '@angular/material/legacy-dialog'; -import { _MatLegacyDialogContainerBase } from '@angular/material/legacy-dialog'; -import { MatLegacyDialogRef } from '@angular/material/legacy-dialog'; -import { OnDestroy } from '@angular/core'; +import { _MatTestDialogOpenerBase } from '@angular/material/dialog/testing'; import { TestElement } from '@angular/cdk/testing'; -// @public -export interface LegacyDialogHarnessFilters extends BaseHarnessFilters { -} - -// @public -export class MatLegacyDialogHarness extends _MatLegacyDialogHarnessBase { - static hostSelector: string; - static with(options?: LegacyDialogHarnessFilters): HarnessPredicate; -} +export { LegacyDialogHarnessFilters } // @public -export class _MatLegacyDialogHarnessBase extends ContentContainerComponentHarness { +export class MatLegacyDialogHarness extends _MatDialogHarnessBase { // (undocumented) protected _actions: AsyncFactoryFn; - close(): Promise; // (undocumented) protected _content: AsyncFactoryFn; - getActionsText(): Promise; - getAriaDescribedby(): Promise; - getAriaLabel(): Promise; - getAriaLabelledby(): Promise; - getContentText(): Promise; - getId(): Promise; - getRole(): Promise; - getText(): Promise; - getTitleText(): Promise; + static hostSelector: string; // (undocumented) protected _title: AsyncFactoryFn; + static with(options?: LegacyDialogHarnessFilters): HarnessPredicate; } // @public @@ -60,24 +40,11 @@ export const enum MatLegacyDialogSection { } // @public -export class MatTestLegacyDialogOpener extends _MatTestLegacyDialogOpenerBase { +export class MatTestLegacyDialogOpener extends _MatTestDialogOpenerBase { constructor(dialog: MatLegacyDialog); static withComponent(component: ComponentType, config?: MatLegacyDialogConfig): ComponentType>; } -// @public -export class _MatTestLegacyDialogOpenerBase implements OnDestroy { - constructor(dialog: _MatLegacyDialogBase); - closedResult: R | undefined; - protected static component: ComponentType | undefined; - protected static config: MatLegacyDialogConfig | undefined; - // (undocumented) - dialog: _MatLegacyDialogBase; - dialogRef: MatLegacyDialogRef; - // (undocumented) - ngOnDestroy(): void; -} - // @public (undocumented) export class MatTestLegacyDialogOpenerModule { }