import {MatOptionHarness} from '@angular/material/core/testing';
MatOptionHarness
extends
ComponentHarness
Harness for interacting with a mat-option
in tests.
Name | Description |
---|---|
|
Selector used to locate option instances. |
async
click
|
|
---|---|
Clicks the option. |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
getText
|
|
---|---|
Gets the option's label text. |
|
Returns | |
Promise<string>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
isActive
|
|
---|---|
Gets whether the option is active. |
|
Returns | |
Promise<boolean>
|
|
async
isDisabled
|
|
---|---|
Gets whether the option is disabled. |
|
Returns | |
Promise<boolean>
|
|
async
isMultiple
|
|
---|---|
Gets whether the option is in multiple selection mode. |
|
Returns | |
Promise<boolean>
|
|
async
isSelected
|
|
---|---|
Gets whether the option is selected. |
|
Returns | |
Promise<boolean>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options OptionHarnessFilters = {}
|
|
MatOptgroupHarness
extends
ComponentHarness
Harness for interacting with a mat-optgroup
in tests.
Name | Description |
---|---|
|
Selector used to locate option group instances. |
async
getLabelText
|
|
---|---|
Gets the option group's label text. |
|
Returns | |
Promise<string>
|
|
async
getOptions
|
|
---|---|
Gets the options that are inside the group. |
|
Parameters | |
filter OptionHarnessFilters = {}
|
|
Returns | |
Promise<MatOptionHarness[]>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
isDisabled
|
|
---|---|
Gets whether the option group is disabled. |
|
Returns | |
Promise<boolean>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options OptgroupHarnessFilters = {}
|
|
OptionHarnessFilters
Name | Description |
---|---|
|
|
|
OptgroupHarnessFilters
Name | Description |
---|---|
|