import {MatRadioGroupHarness} from '@angular/material/radio/testing';
MatRadioGroupHarness
extends
ComponentHarness
Harness for interacting with a standard mat-radio-group in tests.
async
checkRadioButton
|
|
---|---|
Checks a radio button in this group. |
|
Parameters | |
filter RadioButtonHarnessFilters = {}
|
An optional filter to apply to the child radio buttons. The first tab matching the filter will be selected. |
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
getCheckedRadioButton
|
|
---|---|
Gets the checked radio-button in a radio-group. |
|
Returns | |
Promise<MatRadioButtonHarness | null>
|
|
async
getCheckedValue
|
|
---|---|
Gets the checked value of the radio-group. |
|
Returns | |
Promise<string | null>
|
|
async
getId
|
|
---|---|
Gets the id of the radio-group. |
|
Returns | |
Promise<string | null>
|
|
async
getName
|
|
---|---|
Gets the name of the radio-group. |
|
Returns | |
Promise<string | null>
|
|
async
getRadioButtons
|
|
---|---|
Gets a list of radio buttons which are part of the radio-group. |
|
Parameters | |
filter RadioButtonHarnessFilters = {}
|
Optionally filters which radio buttons are included. |
Returns | |
Promise<MatRadioButtonHarness[]>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
MatRadioButtonHarness
extends
ComponentHarness
Harness for interacting with a standard mat-radio-button in tests.
async
blur
|
|
---|---|
Blurs the radio-button. |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
check
|
|
---|---|
Puts the radio-button in a checked state by clicking it if it is currently unchecked, or doing nothing if it is already checked. |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
focus
|
|
---|---|
Focuses the radio-button. |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
getId
|
|
---|---|
Gets the radio-button's id. |
|
Returns | |
Promise<string | null>
|
|
async
getLabelText
|
|
---|---|
Gets the radio-button's label text. |
|
Returns | |
Promise<string>
|
|
async
getName
|
|
---|---|
Gets the radio-button's name. |
|
Returns | |
Promise<string | null>
|
|
async
getValue
|
|
---|---|
Gets the value of the radio-button. The radio-button value will be converted to a string. Note: This means that for radio-button's with an object as a value |
|
Returns | |
Promise<string | null>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
isChecked
|
|
---|---|
Whether the radio-button is checked. |
|
Returns | |
Promise<boolean>
|
|
async
isDisabled
|
|
---|---|
Whether the radio-button is disabled. |
|
Returns | |
Promise<boolean>
|
|
async
isRequired
|
|
---|---|
Whether the radio-button is required. |
|
Returns | |
Promise<boolean>
|
|
RadioGroupHarnessFilters
A set of criteria that can be used to filter a list of MatRadioGroupHarness
instances.
Name | Description |
---|---|
|
Only find instances whose name attribute is the given value. |
RadioButtonHarnessFilters
A set of criteria that can be used to filter a list of MatRadioButtonHarness
instances.
Name | Description |
---|---|
|
Only find instances whose label matches the given value. |
|
Only find instances whose name attribute is the given value. |