import {MatBottomSheetHarness} from '@angular/material/bottom-sheet/testing';
MatBottomSheetHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard MatBottomSheet in tests.
| Name | Description |
|---|---|
|
async
dismiss
|
|
|---|---|
|
Dismisses the bottom sheet by pressing escape. Note that this method cannot be used if "disableClose" has been set to true via the config. |
|
| 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
getAriaLabel
|
|
|---|---|
|
Gets the value of the bottom sheet's "aria-label" attribute. |
|
| Returns | |
Promise<string | null>
|
|
async
getChildLoader
|
|
|---|---|
| Parameters | |
|
selector S
|
|
| Returns | |
Promise<HarnessLoader>
|
|
async
getHarness
|
|
|---|---|
| Parameters | |
|
query HarnessQuery<T>
|
|
| Returns | |
Promise<T>
|
|
async
getHarnessOrNull
|
|
|---|---|
| Parameters | |
|
query HarnessQuery<T>
|
|
| Returns | |
Promise<T | null>
|
|
async
hasHarness
|
|
|---|---|
| Parameters | |
|
query HarnessQuery<T>
|
|
| Returns | |
Promise<boolean>
|
|
async
host
|
|
|---|---|
|
Gets a |
|
| Returns | |
Promise<TestElement>
|
|
static
with
|
|
|---|---|
|
Gets a |
|
| Parameters | |
|
options BottomSheetHarnessFilters = {}
|
Options for narrowing the search. |
| Returns | |
HarnessPredicate<MatBottomSheetHarness>
|
a |
BottomSheetHarnessFilters