import {MatDrawerHarness} from '@angular/material/sidenav/testing';
MatDrawerHarness
Harness for interacting with a standard mat-drawer in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getAllChildLoaders
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T[]>
|
|
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>
|
|
getMode | |
---|---|
Gets the mode that the drawer is in. |
|
Returns | |
Promise<'over' | 'push' | 'side'>
|
|
getPosition | |
---|---|
Gets the position of the drawer inside its container. |
|
Returns | |
Promise<'start' | 'end'>
|
|
async
hasHarness
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<boolean>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
isOpen | |
---|---|
Whether the drawer is open. |
|
Returns | |
Promise<boolean>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options DrawerHarnessFilters = {}
|
Options for filtering which drawer instances are considered a match. |
Returns | |
HarnessPredicate<MatDrawerHarness>
|
a |
MatDrawerContainerHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard mat-drawer-container in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getAllChildLoaders
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T[]>
|
|
async
getChildLoader
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader>
|
|
async
getContent
|
|
---|---|
Gets the element that has the container's content. |
|
Returns | |
Promise<MatDrawerContentHarness>
|
|
async
getDrawers
|
|
---|---|
Gets drawers that match particular criteria within the container. |
|
Parameters | |
filter DrawerHarnessFilters = {}
|
Optionally filters which chips are included. |
Returns | |
Promise<MatDrawerHarness[]>
|
|
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 DrawerContainerHarnessFilters = {}
|
Options for filtering which container instances are considered a match. |
Returns | |
HarnessPredicate<MatDrawerContainerHarness>
|
a |
MatDrawerContentHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard mat-drawer-content in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getAllChildLoaders
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T[]>
|
|
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 DrawerContentHarnessFilters = {}
|
Options for filtering which drawer content instances are considered a match. |
Returns | |
HarnessPredicate<MatDrawerContentHarness>
|
a |
MatSidenavContainerHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard mat-sidenav-container in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getAllChildLoaders
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T[]>
|
|
async
getChildLoader
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader>
|
|
async
getContent
|
|
---|---|
Gets the element that has the container's content. |
|
Returns | |
Promise<MatSidenavContentHarness>
|
|
async
getHarness
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T>
|
|
async
getHarnessOrNull
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T | null>
|
|
async
getSidenavs
|
|
---|---|
Gets sidenavs that match particular criteria within the container. |
|
Parameters | |
filter DrawerHarnessFilters = {}
|
Optionally filters which chips are included. |
Returns | |
Promise<MatSidenavHarness[]>
|
|
async
hasHarness
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<boolean>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options DrawerContainerHarnessFilters = {}
|
Options for filtering which container instances are considered a match. |
Returns | |
HarnessPredicate<MatSidenavContainerHarness>
|
a |
MatSidenavContentHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard mat-sidenav-content in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getAllChildLoaders
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T[]>
|
|
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 DrawerContentHarnessFilters = {}
|
Options for filtering which sidenav content instances are considered a match. |
Returns | |
HarnessPredicate<MatSidenavContentHarness>
|
a |
MatSidenavHarness
Harness for interacting with a standard mat-sidenav in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getAllChildLoaders
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T[]>
|
|
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>
|
|
getMode | |
---|---|
Gets the mode that the drawer is in. |
|
Returns | |
Promise<'over' | 'push' | 'side'>
|
|
getPosition | |
---|---|
Gets the position of the drawer inside its container. |
|
Returns | |
Promise<'start' | 'end'>
|
|
async
hasHarness
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<boolean>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
isFixedInViewport
|
|
---|---|
Whether the sidenav is fixed in the viewport. |
|
Returns | |
Promise<boolean>
|
|
isOpen | |
---|---|
Whether the drawer is open. |
|
Returns | |
Promise<boolean>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options DrawerHarnessFilters = {}
|
Options for filtering which sidenav instances are considered a match. |
Returns | |
HarnessPredicate<MatSidenavHarness>
|
a |
DrawerHarnessFilters
A set of criteria that can be used to filter a list of MatDrawerHarness
instances.
Name | Description |
---|---|
|
Only find instances whose side is the given value. |
DrawerContainerHarnessFilters
A set of criteria that can be used to filter a list of MatDrawerContainerHarness
instances.
DrawerContentHarnessFilters
A set of criteria that can be used to filter a list of MatDrawerContentHarness
instances.