import {MatStepperHarness} from '@angular/material/stepper/testing';
MatStepperHarness
extends
ComponentHarness
Harness for interacting with a standard Material stepper in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getOrientation
|
|
---|---|
Gets the orientation of the stepper. |
|
Returns | |
Promise<StepperOrientation>
|
|
async
getSteps
|
|
---|---|
Gets the list of steps in the stepper. |
|
Parameters | |
filter StepHarnessFilters = {}
|
|
Returns | |
Promise<MatStepHarness[]>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
selectStep
|
|
---|---|
Selects a step in this stepper. |
|
Parameters | |
filter StepHarnessFilters = {}
|
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options StepperHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatStepperHarness>
|
a |
MatStepHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard Angular Material step 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
getAriaLabel
|
|
---|---|
Gets the |
|
Returns | |
Promise<string | null>
|
|
async
getAriaLabelledby
|
|
---|---|
Gets the value of the |
|
Returns | |
Promise<string | null>
|
|
async
getChildLoader
|
|
---|---|
Parameters | |
selector S
|
|
Returns | |
Promise<HarnessLoader>
|
|
async
getHarness
|
|
---|---|
Parameters | |
query HarnessQuery<T>
|
|
Returns | |
Promise<T>
|
|
async
getLabel
|
|
---|---|
Gets the label of the step. |
|
Returns | |
Promise<string>
|
|
async
getRootHarnessLoader
|
|
---|---|
Returns | |
Promise<HarnessLoader>
|
|
async
hasErrors
|
|
---|---|
Whether the step is currently showing its error state. Note that this doesn't mean that there
are or aren't any invalid form controls inside the step, but that the step is showing its
error-specific styling which depends on there being invalid controls, as well as the
|
|
Returns | |
Promise<boolean>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
isCompleted
|
|
---|---|
Whether the step has been filled out. |
|
Returns | |
Promise<boolean>
|
|
async
isOptional
|
|
---|---|
Whether the step is optional. |
|
Returns | |
Promise<boolean>
|
|
async
isSelected
|
|
---|---|
Whether the step is selected. |
|
Returns | |
Promise<boolean>
|
|
async
select
|
|
---|---|
Selects the given step by clicking on the label. The step may not be selected if the stepper doesn't allow it (e.g. if there are validation errors). |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options StepHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatStepHarness>
|
a |
MatStepperNextHarness
Harness for interacting with a standard Angular Material stepper next button in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
click | |
---|---|
Clicks the button. |
|
Returns | |
Promise<void>
|
|
getText | |
---|---|
Gets the text of the button. |
|
Returns | |
Promise<string>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options StepperButtonHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatStepperNextHarness>
|
a |
MatStepperPreviousHarness
Harness for interacting with a standard Angular Material stepper previous button in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
click | |
---|---|
Clicks the button. |
|
Returns | |
Promise<void>
|
|
getText | |
---|---|
Gets the text of the button. |
|
Returns | |
Promise<string>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options StepperButtonHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatStepperPreviousHarness>
|
a |
StepHarnessFilters
A set of criteria that can be used to filter a list of MatStepHarness
instances.
Name | Description |
---|---|
|
Only find completed steps. |
|
Only find steps that have errors. |
|
Only find instances whose label matches the given value. |
|
Only find steps with the given selected state. |
StepperHarnessFilters
A set of criteria that can be used to filter a list of MatStepperHarness
instances.
Name | Description |
---|---|
|
Only find instances whose orientation matches the given value. |
StepperButtonHarnessFilters
A set of criteria that can be used to filter a list of
MatStepperNextHarness
and MatStepperPreviousHarness
instances.
Name | Description |
---|---|
|
Only find instances whose text matches the given value. |