import {MatTabGroupHarness} from '@angular/material/tabs/testing';
MatTabGroupHarness
extends
ComponentHarness
Harness for interacting with a standard mat-tab-group in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
getSelectedTab
|
|
---|---|
Gets the selected tab of the tab group. |
|
Returns | |
Promise<MatTabHarness>
|
|
async
getTabs
|
|
---|---|
Gets the list of tabs in the tab group. |
|
Parameters | |
filter TabHarnessFilters = {}
|
|
Returns | |
Promise<MatTabHarness[]>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
selectTab
|
|
---|---|
Selects a tab in this tab group. |
|
Parameters | |
filter TabHarnessFilters = {}
|
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options TabGroupHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatTabGroupHarness>
|
a |
MatTabHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard Angular Material tab-label 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 aria-label of the tab. |
|
Returns | |
Promise<string | null>
|
|
async
getAriaLabelledby
|
|
---|---|
Gets the value of the "aria-labelledby" attribute. |
|
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 tab. |
|
Returns | |
Promise<string>
|
|
async
getRootHarnessLoader
|
|
---|---|
Returns | |
Promise<HarnessLoader>
|
|
async
getTextContent
|
|
---|---|
Gets the text content of the tab. |
|
Returns | |
Promise<string>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
isDisabled
|
|
---|---|
Whether the tab is disabled. |
|
Returns | |
Promise<boolean>
|
|
async
isSelected
|
|
---|---|
Whether the tab is selected. |
|
Returns | |
Promise<boolean>
|
|
async
select
|
|
---|---|
Selects the given tab by clicking on the label. Tab cannot be selected if disabled. |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options TabHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatTabHarness>
|
a |
Deprecated
async
getHarnessLoaderForContent
|
|
---|---|
Gets a |
|
Returns | |
Promise<HarnessLoader>
|
|
MatTabNavBarHarness
extends
ComponentHarness
Harness for interacting with a standard mat-tab-nav-bar in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
clickLink
|
|
---|---|
Clicks a link inside the nav bar. |
|
Parameters | |
filter TabLinkHarnessFilters = {}
|
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
getActiveLink
|
|
---|---|
Gets the active link in the nav bar. |
|
Returns | |
Promise<MatTabLinkHarness>
|
|
async
getLinks
|
|
---|---|
Gets the list of links in the nav bar. |
|
Parameters | |
filter TabLinkHarnessFilters = {}
|
|
Returns | |
Promise<MatTabLinkHarness[]>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options TabNavBarHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatTabNavBarHarness>
|
a |
MatTabLinkHarness
extends
ComponentHarness
Harness for interacting with a standard Angular Material tab link in tests.
Name | Description |
---|---|
|
The selector for the host element of a |
async
click
|
|
---|---|
Clicks on the link. |
|
Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
getLabel
|
|
---|---|
Gets the label of the link. |
|
Returns | |
Promise<string>
|
|
async
host
|
|
---|---|
Gets a |
|
Returns | |
Promise<TestElement>
|
|
async
isActive
|
|
---|---|
Whether the link is active. |
|
Returns | |
Promise<boolean>
|
|
async
isDisabled
|
|
---|---|
Whether the link is disabled. |
|
Returns | |
Promise<boolean>
|
|
static
with
|
|
---|---|
Gets a |
|
Parameters | |
options TabLinkHarnessFilters = {}
|
|
Returns | |
HarnessPredicate<MatTabLinkHarness>
|
a |
TabHarnessFilters
A set of criteria that can be used to filter a list of MatTabHarness
instances.
Name | Description |
---|---|
|
Only find instances whose label matches the given value. |
TabGroupHarnessFilters
A set of criteria that can be used to filter a list of MatTabGroupHarness
instances.
Name | Description |
---|---|
|
Only find instances whose selected tab label matches the given value. |
TabLinkHarnessFilters
A set of criteria that can be used to filter a list of MatTabLinkHarness
instances.
Name | Description |
---|---|
|
Only find instances whose label matches the given value. |
TabNavBarHarnessFilters
A set of criteria that can be used to filter a list of MatTabNavBarHarness
instances.