import {MatDialogHarness} from '@angular/material/dialog/testing';
MatDialogHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard MatDialog
in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
close
|
|
---|---|
Closes the dialog by pressing escape. Note: this method does nothing if |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
getAllChildLoaders
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T[]>
|
|
async
getAriaDescribedby
|
|
---|---|
Gets the value of the dialog's "aria-describedby" attribute. |
|
Returns | |
Promise<string | null>
|
|
async
getAriaLabel
|
|
---|---|
Gets the value of the dialog's "aria-label" attribute. |
|
Returns | |
Promise<string | null>
|
|
async
getAriaLabelledby
|
|
---|---|
Gets the value of the dialog's "aria-labelledby" attribute. |
|
Returns | |
Promise<string | null>
|
|
async
getChildLoader
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader>
|
|
async
getHarness
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T>
|
|
async
getId
|
|
---|---|
Gets the id of the dialog. |
|
Returns | |
Promise<string | null>
|
|
async
getRole
|
|
---|---|
Gets the role of the dialog. |
|
Returns | |
Promise<DialogRole | null>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options DialogHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatDialogHarness>
|
a |
DialogHarnessFilters
A set of criteria that can be used to filter a list of MatDialogHarness
instances.