import {MatCardHarness} from '@angular/material/card/testing';
MatCardHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard mat-card 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
getSubtitleText
|
|
---|---|
Gets the cards's subtitle text. |
|
Returns | |
Promise<string>
|
|
async
getText
|
|
---|---|
Gets all of the card's content as text. |
|
Returns | |
Promise<string>
|
|
async
getTitleText
|
|
---|---|
Gets the cards's title text. |
|
Returns | |
Promise<string>
|
|
async
hasHarness
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<boolean>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options CardHarnessFilters = {}
|
Options for filtering which card instances are considered a match. |
Returns | |
HarnessPredicate<MatCardHarness>
|
a |
CardHarnessFilters
A set of criteria that can be used to filter a list of MatCardHarness
instances.
Name | Description |
---|---|
|
Only find instances whose subtitle matches the given value. |
|
Only find instances whose text matches the given value. |
|
Only find instances whose title matches the given value. |